Skip to content

Commit

Permalink
Merge pull request #341 from dappforce/deploy/image
Browse files Browse the repository at this point in the history
Fix permission
  • Loading branch information
olehmell authored Mar 11, 2024
2 parents 990e72d + 60bbc16 commit cbcd525
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/profile-selector/MyAccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const AccountMenu: React.FunctionComponent<AddressProps> = ({ address, ow
setIsOpenProfileModal(false)
} else if (name === 'redirect') {
router.push(value)
setIsOpenProfileModal(false)
} else if (name === 'redirect-hard') {
// Using router push for redirect don't redirect properly, it just have loading for a bit and changes the url much later
window.location.href = value
Expand Down
10 changes: 6 additions & 4 deletions src/components/spaces/roles/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ export const useCheckCanEditAndHideSpacePermission = ({ post: { struct }, space
updateOwn: 'HideOwnPosts',
}

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

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

const canMovePost = isMyPost && !isComment

Expand Down

0 comments on commit cbcd525

Please sign in to comment.