Skip to content

Commit

Permalink
Add hide any posts to allow space owners to hide anyone's posts based…
Browse files Browse the repository at this point in the history
… on their permission
  • Loading branch information
teodorus-nathaniel committed Mar 11, 2024
1 parent 85a3c2a commit b3f66fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/spaces/roles/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export const useCheckCanEditAndHideSpacePermission = ({ post: { struct }, space
updateOwn: 'HideOwnPosts',
}

const canHidePost = isMyPost && checkSpacePermission(hideOwn)
// || checkSpacePermission('HideAnyPost')
const canHidePost =
(isMyPost && checkSpacePermission(hideOwn)) || checkSpacePermission('HideAnyPost')

const canEditPost = isMyPost && checkSpacePermission(updateOwn)
// || checkSpacePermission('UpdateAnyPost')
const canEditPost =
(isMyPost && checkSpacePermission(updateOwn)) || checkSpacePermission('UpdateAnyPost')

const canMovePost = isMyPost && !isComment

Expand Down

0 comments on commit b3f66fa

Please sign in to comment.