1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

[bug] report errors on admin creation

This commit is contained in:
Sylvain 2019-12-02 10:39:42 +01:00
parent f72ae98109
commit 36eba99808
7 changed files with 8 additions and 2 deletions

View File

@ -14,6 +14,7 @@
- Updated moment-timezone
- Added freeCAD files as default allowed extensions
- Fix a bug: unable to remove the picture from a training
- Fix a bug: report errors on admin creation
- Fix a security issue: updated loofah to fix [CVE-2019-15587](https://github.com/advisories/GHSA-c3gv-9cxf-6f57)
- Fix a security issue: updated angular to 1.7.9 to fix [CVE-2019-10768](https://github.com/advisories/GHSA-89mq-4x47-5v83)
- [TODO DEPLOY] add the `SLOT_DURATION` environment variable (see [doc/environment.md](doc/environment.md#SLOT_DURATION) for configuration details)

View File

@ -754,7 +754,8 @@ Application.Controllers.controller('NewAdminController', ['$state', '$scope', 'A
return $state.go('app.admin.members');
}
, function (error) {
console.log(error);
growl.error(_t('failed_to_create_admin') + JSON.stringify(error.data ? error.data : error));
console.error(error);
}
);
};

View File

@ -41,7 +41,7 @@ class UserService
# if the authentication is made through an SSO, generate a migration token
admin.generate_auth_migration_token unless AuthProvider.active.providable_type == DatabaseProvider.name
saved = admin.save(validate: false)
saved = admin.save
if saved
admin.send_confirmation_instructions
admin.add_role(:admin)

View File

@ -678,6 +678,7 @@ en:
# add a new administrator to the platform
add_an_administrator: "Add an administrator"
administrator_successfully_created_he_will_receive_his_connection_directives_by_email: "Administrator successfully created. {GENDER, select, female{She} other{He}} receive {GENDER, select, female{her} other{his}} connection directives by e-mail." # messageFormat interpolation
failed_to_create_admin: "Unable to create the administrator:"
authentication_new:
# add a new authentication provider (SSO)

View File

@ -678,6 +678,7 @@ es:
# add a new administrator to the platform
add_an_administrator: "Agregar un administrador"
administrator_successfully_created_he_will_receive_his_connection_directives_by_email: "administrador creado correctamente. {GENDER, select, female{She} other{He}} receive {GENDER, select, female{her} other{his}} directivas de conexión por e-mail." # messageFormat interpolation
failed_to_create_admin: "No se puede crear el administrador :"
authentication_new:
# add a new authentication provider (SSO)

View File

@ -694,6 +694,7 @@ fr:
# ajouter un nouvel administrateur à la plate-forme
add_an_administrator: "Ajouter un administrateur"
administrator_successfully_created_he_will_receive_his_connection_directives_by_email: "L'administrateur a bien été créé. {GENDER, select, female{Elle} other{Il}} recevra ses instructions de connexion par email." # messageFormat interpolation
failed_to_create_admin: "Impossible de créer l'administrateur :"
authentication_new:
# ajouter un nouveau fournisseur d'authentification (SSO)

View File

@ -678,6 +678,7 @@ pt:
# add a new administrator to the platform
add_an_administrator: "Adicionar administrador"
administrator_successfully_created_he_will_receive_his_connection_directives_by_email: "Administrator criado com sucesso. {GENDER, select, female{Ela} other{Ele}} receberá {GENDER, select, female{sua} other{seu}} diretivas de conexão por e-mail." # messageFormat interpolation
failed_to_create_admin: "Não é possível criar administrador:"
authentication_new:
# add a new authentication provider (SSO)