Skip to content

Commit

Permalink
fix: only users with editing permissions can join the protected colla… (
Browse files Browse the repository at this point in the history
#2504)

* fix: only users with editing permissions can join the protected collaboration

* fix: fix unhide permission
  • Loading branch information
ybzky committed Jun 13, 2024
1 parent b3393ef commit 2ea683e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/sheets-ui/src/controllers/menu/sheet.menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ export function ShowMenuItemFactory(accessor: IAccessor): IMenuButtonItem {
subscriber.next(false);
return disposable.dispose;
}).pipe(
combineLatestWith(getWorkbookPermissionDisable$(accessor, [WorkbookEditablePermission])),
map(([defaultDisabled, permissionDisabled]) => defaultDisabled || permissionDisabled
)),
combineLatestWith(getWorkbookPermissionDisable$(accessor, [WorkbookEditablePermission, WorkbookHideSheetPermission])),
map(([defaultDisabled, permissionDisabled]) => defaultDisabled || permissionDisabled)),
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const SheetPermissionUserDialog = () => {
const sheetPermissionUserManagerService = useDependency(SheetPermissionUserManagerService);
const userList = sheetPermissionUserManagerService.userList;
const searchUserList = userList.filter((item) => {
return item.subject?.name.toLocaleLowerCase().includes(inputValue.toLocaleLowerCase()) && item.role !== UnitRole.Owner;
return item.subject?.name.toLocaleLowerCase().includes(inputValue.toLocaleLowerCase()) && item.role === UnitRole.Editor;
});
const [selectUserInfo, setSelectUserInfo] = useState<ICollaborator[]>(sheetPermissionUserManagerService.selectUserList);

Expand Down

0 comments on commit 2ea683e

Please sign in to comment.