15 lines
250 B
Ruby
15 lines
250 B
Ruby
|
class EntityPolicy < ApplicationPolicy
|
||
|
|
||
|
def owner?
|
||
|
member.admin?
|
||
|
end
|
||
|
alias :owner? :index?
|
||
|
alias :owner? :show?
|
||
|
alias :owner? :create?
|
||
|
alias :owner? :new?
|
||
|
alias :owner? :update?
|
||
|
alias :owner? :edit?
|
||
|
alias :owner? :destroy?
|
||
|
|
||
|
end
|