mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-13 23:48:55 +01:00
21 lines
416 B
Ruby
21 lines
416 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Check the access policies for API::SupportingDocumentFilesController
|
|
class SupportingDocumentFilePolicy < ApplicationPolicy
|
|
def index?
|
|
user.privileged?
|
|
end
|
|
|
|
def create?
|
|
user.privileged? or record.user_id == user.id
|
|
end
|
|
|
|
def update?
|
|
user.privileged? or record.user_id == user.id
|
|
end
|
|
|
|
def download?
|
|
user.privileged? or record.user_id == user.id
|
|
end
|
|
end
|