otwarchive-symphonyarchive/app/policies/profile_policy.rb

11 lines
244 B
Ruby
Raw Permalink Normal View History

2026-03-11 22:22:11 +00:00
class ProfilePolicy < ApplicationPolicy
# Roles that allow updating a user's profile.
EDIT_ROLES = %w[superadmin policy_and_abuse].freeze
def can_edit_profile?
user_has_roles?(EDIT_ROLES)
end
alias update? can_edit_profile?
end