pundit: convert uploads to pundit.

This commit is contained in:
evazion
2020-03-20 02:59:02 -05:00
parent d51b0dfe17
commit 7f742242e4
3 changed files with 28 additions and 18 deletions

View File

@@ -0,0 +1,19 @@
class UploadPolicy < ApplicationPolicy
def batch?
unbanned?
end
def image_proxy?
unbanned?
end
def preprocess?
unbanned?
end
def permitted_attributes
%i[file source tag_string rating status parent_id artist_commentary_title
artist_commentary_desc include_artist_commentary referer_url
md5_confirmation as_pending translated_commentary_title translated_commentary_desc]
end
end