From 441e5fc054e4e8c42fba51e3e965cc1787c3faa3 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:21:05 +0530 Subject: [PATCH] chore: update page lock authorization (#5635) --- web/core/store/pages/page.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/web/core/store/pages/page.ts b/web/core/store/pages/page.ts index dd772ad01a..a6e5629848 100644 --- a/web/core/store/pages/page.ts +++ b/web/core/store/pages/page.ts @@ -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; } /**