Organize roles in order of access
This commit is contained in:
@@ -130,28 +130,29 @@ function Invite({ onSubmit }: Props) {
|
||||
) : undefined;
|
||||
|
||||
const options = React.useMemo(() => {
|
||||
const memo = [
|
||||
{
|
||||
label: t("Editor"),
|
||||
description: t("Can create, edit, and delete documents"),
|
||||
value: "member",
|
||||
},
|
||||
{
|
||||
label: t("Viewer"),
|
||||
description: t("Can view documents and comment"),
|
||||
value: "viewer",
|
||||
},
|
||||
];
|
||||
const memo = [];
|
||||
|
||||
if (user.isAdmin) {
|
||||
memo.push({
|
||||
label: t("Admin"),
|
||||
description: t("Can manage all workspace settings"),
|
||||
value: "admin",
|
||||
value: UserRole.Admin,
|
||||
});
|
||||
}
|
||||
|
||||
return memo;
|
||||
return [
|
||||
...memo,
|
||||
{
|
||||
label: t("Editor"),
|
||||
description: t("Can create, edit, and delete documents"),
|
||||
value: UserRole.Member,
|
||||
},
|
||||
{
|
||||
label: t("Viewer"),
|
||||
description: t("Can view and comment"),
|
||||
value: UserRole.Viewer,
|
||||
},
|
||||
];
|
||||
}, [t, user]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -659,9 +659,9 @@
|
||||
"Sorry, you can only send {{MAX_INVITES}} invites at a time": "Sorry, you can only send {{MAX_INVITES}} invites at a time",
|
||||
"Invited {{roleName}} will receive access to": "Invited {{roleName}} will receive access to",
|
||||
"{{collectionCount}} collections": "{{collectionCount}} collections",
|
||||
"Can create, edit, and delete documents": "Can create, edit, and delete documents",
|
||||
"Can view documents and comment": "Can view documents and comment",
|
||||
"Can manage all workspace settings": "Can manage all workspace settings",
|
||||
"Can create, edit, and delete documents": "Can create, edit, and delete documents",
|
||||
"Can view and comment": "Can view and comment",
|
||||
"Invite people to join your workspace. They can sign in with {{signinMethods}} or use their email address.": "Invite people to join your workspace. They can sign in with {{signinMethods}} or use their email address.",
|
||||
"Invite members to join your workspace. They will need to sign in with {{signinMethods}}.": "Invite members to join your workspace. They will need to sign in with {{signinMethods}}.",
|
||||
"As an admin you can also <2>enable email sign-in</2>.": "As an admin you can also <2>enable email sign-in</2>.",
|
||||
|
||||
Reference in New Issue
Block a user