hubfeenix.fi/app/policies/profile_policy.rb

10 lines
160 B
Ruby
Raw Normal View History

2023-01-15 23:17:22 +01:00
class ProfilePolicy < ApplicationPolicy
2023-01-15 20:50:58 +01:00
def edit?
(member == record.member) or member.admin?
end
alias :update? :edit?
alias :destroy? :edit?
end