Skip to content

Commit

Permalink
chore: update page lock authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 committed Sep 18, 2024
1 parent 146a500 commit 18ce3d0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions web/core/store/pages/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 18ce3d0

Please sign in to comment.