12 lines
215 B
Ruby
12 lines
215 B
Ruby
# allows to edit/detroy own data
|
|
# which can be viewed by anyone
|
|
class AdminPolicy < ApplicationPolicy
|
|
def edit?
|
|
member.admin?
|
|
end
|
|
alias :update? :edit?
|
|
alias :show? :edit?
|
|
alias :destroy? :edit?
|
|
|
|
end
|