sarting to generalize profiles
This commit is contained in:
9
app/policies/profile_policy.rb
Normal file
9
app/policies/profile_policy.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class ProfilePolicy < ApplicationPolicy
|
||||
|
||||
def edit?
|
||||
(member == record.member) or member.admin?
|
||||
end
|
||||
alias :update? :edit?
|
||||
alias :destroy? :edit?
|
||||
|
||||
end
|
Reference in New Issue
Block a user