29 lines
264 B
Ruby
29 lines
264 B
Ruby
|
class CheckPolicy < ApplicationPolicy
|
||
|
def index?
|
||
|
true
|
||
|
end
|
||
|
|
||
|
def show?
|
||
|
true
|
||
|
end
|
||
|
|
||
|
def create?
|
||
|
false
|
||
|
end
|
||
|
|
||
|
def new?
|
||
|
create?
|
||
|
end
|
||
|
|
||
|
def update?
|
||
|
user.admin?
|
||
|
end
|
||
|
|
||
|
def edit?
|
||
|
update?
|
||
|
end
|
||
|
|
||
|
def destroy?
|
||
|
user.admin?
|
||
|
end
|
||
|
end
|