Add manage permission to documents (#7003)

This commit is contained in:
Tom Moor
2024-06-10 20:38:23 -04:00
committed by GitHub
parent 1ad7c7409a
commit 7bf5c4e533
9 changed files with 43 additions and 20 deletions

View File

@@ -23,15 +23,16 @@ function InputSelectPermission(
ref={ref}
label={t("Permission")}
options={[
{
label: t("Can edit"),
value: CollectionPermission.ReadWrite,
},
{
label: t("View only"),
value: CollectionPermission.Read,
},
{
label: t("Can edit"),
value: CollectionPermission.ReadWrite,
},
{
divider: true,
label: t("No access"),
value: EmptySelectValue,
},

View File

@@ -53,16 +53,16 @@ function CollectionMemberList({ collection, invitedInSession }: Props) {
() =>
[
{
label: t("Admin"),
value: CollectionPermission.Admin,
label: t("View only"),
value: CollectionPermission.Read,
},
{
label: t("Can edit"),
value: CollectionPermission.ReadWrite,
},
{
label: t("View only"),
value: CollectionPermission.Read,
label: t("Manage"),
value: CollectionPermission.Admin,
},
{
divider: true,

View File

@@ -229,16 +229,16 @@ function SharePopover({ collection, visible, onRequestClose }: Props) {
() =>
[
{
label: t("Admin"),
value: CollectionPermission.Admin,
label: t("View only"),
value: CollectionPermission.Read,
},
{
label: t("Can edit"),
value: CollectionPermission.ReadWrite,
},
{
label: t("View only"),
value: CollectionPermission.Read,
label: t("Manage"),
value: CollectionPermission.Admin,
},
] as Permission[],
[t]

View File

@@ -51,6 +51,10 @@ const DocumentMemberListItem = ({
label: t("Can edit"),
value: DocumentPermission.ReadWrite,
},
{
label: t("Manage"),
value: DocumentPermission.Admin,
},
{
divider: true,
label: t("Remove"),

View File

@@ -202,13 +202,17 @@ function SharePopover({
const permissions = React.useMemo(
() =>
[
{
label: t("View only"),
value: DocumentPermission.Read,
},
{
label: t("Can edit"),
value: DocumentPermission.ReadWrite,
},
{
label: t("View only"),
value: DocumentPermission.Read,
label: t("Manage"),
value: DocumentPermission.Admin,
},
] as Permission[],
[t]