uploads: only let users see their own uploads on /uploads listing.

This commit is contained in:
evazion
2020-04-06 14:12:57 -05:00
parent b2ee1f0766
commit 1e0f6f730a
4 changed files with 17 additions and 3 deletions

View File

@@ -1,4 +1,8 @@
class UploadPolicy < ApplicationPolicy
def show?
user.is_admin? || record.uploader_id == user.id
end
def batch?
unbanned?
end