Added acces rules for jobs, operator/jobs and admin/dashboard view, including lazy loading for cancel button in broadcasts
This commit is contained in:
21
app/policies/operator/job_policy.rb
Normal file
21
app/policies/operator/job_policy.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
class Operator::JobPolicy < ApplicationPolicy
|
||||
pre_check :allow_operators
|
||||
|
||||
def index?
|
||||
end
|
||||
|
||||
def update?
|
||||
end
|
||||
|
||||
def increment_page?
|
||||
end
|
||||
|
||||
def decrement_page?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def allow_operators
|
||||
allow! if user.operator?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user