pundit: convert delayed jobs to pundit.

This commit is contained in:
evazion
2020-03-17 18:09:10 -05:00
parent 4a36b99614
commit b83c612246
3 changed files with 16 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
class DelayedJobPolicy < ApplicationPolicy
def update?
user.is_admin?
end
alias_method :cancel?, :update?
alias_method :destroy?, :update?
alias_method :retry?, :update?
alias_method :run?, :update?
end