otwarchive-sunsetarchive/app/policies/profile_policy.rb
2026-03-17 01:16:49 -04:00

10 lines
244 B
Ruby
Executable file

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