Add post regenerations
This commit is contained in:
9
app/policies/post_regeneration_policy.rb
Normal file
9
app/policies/post_regeneration_policy.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class PostRegenerationPolicy < ApplicationPolicy
|
||||
def create?
|
||||
user.is_moderator?
|
||||
end
|
||||
|
||||
def permitted_attributes_for_create
|
||||
[:post_id, :category]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user