diff --git a/src/components/routes/admin/users_add.tsx b/src/components/routes/admin/users_add.tsx index 070ae8625..944ba510a 100644 --- a/src/components/routes/admin/users_add.tsx +++ b/src/components/routes/admin/users_add.tsx @@ -43,6 +43,7 @@ const useStyles = makeStyles(theme => ({ type User = { avatar: string; email: string; + identity_id: string; groups: string[]; is_active: boolean; type: string[]; @@ -54,6 +55,7 @@ type User = { submission_quota: number; api_daily_quota: number; submission_daily_quota: number; + submission_async_quota: number; roles?: string[]; }; @@ -73,13 +75,15 @@ const WrappedAddUserPage = () => { type: ['user'], classification: c12nDef.UNRESTRICTED, email: '', + identity_id: '', name: '', new_pass: '', uname: '', api_quota: 10, submission_quota: 5, api_daily_quota: 0, - submission_daily_quota: 0 + submission_daily_quota: 0, + submission_async_quota: 0 }), [c12nDef.UNRESTRICTED] ); @@ -160,7 +164,7 @@ const WrappedAddUserPage = () => { -
+
{t('newuser.title')} @@ -218,7 +222,7 @@ const WrappedAddUserPage = () => { onChange={(event, chips) => setNewUser(u => ({ ...u, groups: chips }))} /> - + {t('newuser.new_pass')} { value={newUser.new_pass} /> - + {t('newuser.email')} { value={newUser.email} /> + + {t('newuser.identity_id')} + setNewUser(u => ({ ...u, identity_id: event.target.value }))} + value={newUser.identity_id} + /> + {t('newuser.user_type')}
@@ -281,7 +296,7 @@ const WrappedAddUserPage = () => { value={String(newUser.api_daily_quota)} /> - + {t('newuser.submission_quota')} { value={String(newUser.submission_quota)} /> - + + {t('newuser.submission_async_quota')} + setNewUser(u => ({ ...u, submission_async_quota: parseNum(event) }))} + value={String(newUser.submission_async_quota)} + /> + + {t('newuser.submission_daily_quota')} + {currentUser.is_admin && ( + + {isXS ? null : {t('identity_id')}} + + {!isXS ? null : {t('identity_id')}} + {user ?
{user.identity_id}
: } +
+ +
+ )} diff --git a/src/locales/en/admin/users.json b/src/locales/en/admin/users.json index 19f7de88f..47c1494c4 100644 --- a/src/locales/en/admin/users.json +++ b/src/locales/en/admin/users.json @@ -13,11 +13,13 @@ "header.uid": "Username", "newuser.api_daily_quota": "Daily API Quota", "newuser.api_quota": "API Quota", - "newuser.email": "Email", + "newuser.email": "Email (optional)", + "newuser.identity_id": "Identity ID (optional)", "newuser.groups": "Groups", "newuser.name": "Full Name", - "newuser.new_pass": "Password", + "newuser.new_pass": "Password (optional)", "newuser.save": "Add user", + "newuser.submission_async_quota": "Async Submission Quota", "newuser.submission_daily_quota": "Daily Submission Quota", "newuser.submission_quota": "Submission Quota", "newuser.success": "New user was successfully added.", diff --git a/src/locales/en/user.json b/src/locales/en/user.json index 6b48a6ab4..67ec573c2 100644 --- a/src/locales/en/user.json +++ b/src/locales/en/user.json @@ -55,6 +55,7 @@ "done": "Done", "email": "Email Address", "enabled": "Account Enabled", + "identity_id": "Identity ID", "groups": "Groups", "groups_edit_title": "Groups are not for access control, they are used to group submissions of users of the same group together. When you submit a file, all groups you are member of are assigned to the submission.", "name": "Full Name", diff --git a/src/locales/fr/admin/users.json b/src/locales/fr/admin/users.json index 008888b26..3ed6a1066 100644 --- a/src/locales/fr/admin/users.json +++ b/src/locales/fr/admin/users.json @@ -13,11 +13,13 @@ "header.uid": "Nom d'utilisateur", "newuser.api_daily_quota": "Quota d'API quotidien", "newuser.api_quota": "Quota d'API", - "newuser.email": "Email", + "newuser.email": "Email (Optionel)", + "newuser.identity_id": "ID d’identité (Optionel)", "newuser.groups": "Groupes", "newuser.name": "Nom complet", - "newuser.new_pass": "Mot de passe", + "newuser.new_pass": "Mot de passe (Optionel)", "newuser.save": "Ajouter", + "newuser.submission_async_quota": "Quota de soumission asynchrone", "newuser.submission_daily_quota": "Quota de soumission quotidien", "newuser.submission_quota": "Quota de soumission", "newuser.success": "Le nouvel utilisateur a été ajouté avec succès.", diff --git a/src/locales/fr/user.json b/src/locales/fr/user.json index c699c8a26..87e736730 100644 --- a/src/locales/fr/user.json +++ b/src/locales/fr/user.json @@ -55,6 +55,7 @@ "done": "Terminé", "email": "Adresse courriel", "enabled": "Compte actif", + "identity_id": "ID d’identité", "groups": "Groupes", "groups_edit_title": "Les groupes ne sont pas destinés au contrôle d'accès, ils sont utilisés pour regrouper les soumissions des utilisateurs du même groupe. Lorsque vous soumettez un fichier, tous les groupes dont vous êtes membre sont affectés à la soumission.", "name": "Nom complet",