transferred Code Ocean from original repository to GitHub
This commit is contained in:
5
app/policies/admin_only_policy.rb
Normal file
5
app/policies/admin_only_policy.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class AdminOnlyPolicy < ApplicationPolicy
|
||||
[:create?, :destroy?, :edit?, :index?, :new?, :show?, :update?].each do |action|
|
||||
define_method(action) { admin? }
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user