chore: update page lock authorization (#5635)

This commit is contained in:
Aaryan Khandelwal
2024-09-18 18:21:05 +05:30
committed by GitHub
parent 43633f2f28
commit 441e5fc054

View File

@@ -240,13 +240,7 @@ export class Page implements IPage {
* @description returns true if the current logged in user can lock the page
*/
get canCurrentUserLockPage() {
const { workspaceSlug, projectId } = this.store.router;
const currentUserProjectRole = this.store.user.permission.projectPermissionsByWorkspaceSlugAndProjectId(
workspaceSlug?.toString() || "",
projectId?.toString() || ""
);
return this.isCurrentUserOwner || (!!currentUserProjectRole && currentUserProjectRole >= EUserPermissions.MEMBER);
return this.isCurrentUserOwner;
}
/**