pundit: convert artist commentaries to pundit.

This commit is contained in:
evazion
2020-03-19 14:12:52 -05:00
parent 3d83c3154e
commit ce1133dd69
2 changed files with 28 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
class ArtistCommentaryPolicy < ApplicationPolicy
def create_or_update?
unbanned?
end
def revert?
unbanned?
end
def permitted_attributes
%i[
original_description original_title
translated_description translated_title
remove_commentary_tag remove_commentary_request_tag
remove_commentary_check_tag remove_partial_commentary_tag
add_commentary_tag add_commentary_request_tag
add_commentary_check_tag add_partial_commentary_tag
]
end
end