Skip to content

Commit

Permalink
Merge pull request #284 from PermanentOrg/VSP-1049
Browse files Browse the repository at this point in the history
Vsp 1049 Managers can't edit public profile photos
  • Loading branch information
luciancerbu-vsp authored Jan 11, 2023
2 parents e8f3abe + f2965df commit 4ae0f91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PublicArchiveViewController: BaseViewController<PublicProfilePicturesViewM
navigationItem.leftBarButtonItem = UIBarButtonItem(image: leftButtonImage, style: .plain, target: self, action: #selector(closeButtonAction(_:)))
}

if !archiveData.permissions().contains(.ownership) {
if viewModel?.canEditPublicProfilePhoto() == true {
changeProfilePhotoButton.isHidden = true
changeProfilePhotoButtonView.alpha = 0
changeProfileBannerPhotoButtonView.alpha = 0
Expand Down
4 changes: 4 additions & 0 deletions Permanent/ViewModels/PublicProfilePicturesViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,8 @@ class PublicProfilePicturesViewModel: ViewModelInterface {
}
}
}

func canEditPublicProfilePhoto() -> Bool {
return !archiveData.permissions().contains(.archiveShare)
}
}

0 comments on commit 4ae0f91

Please sign in to comment.