Module: Avo::Fields::Concerns::FileAuthorization

Extended by:
ActiveSupport::Concern
Included in:
Avo::Fields::Common::Files::ControlsComponent, FileField::EditComponent, FilesField::EditComponent
Defined in:
lib/avo/fields/concerns/file_authorization.rb

Instance Method Summary collapse

Instance Method Details

#can_delete_file?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/avo/fields/concerns/file_authorization.rb', line 15

def can_delete_file?
  authorize_file_action(:delete)
end

#can_download_file?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/avo/fields/concerns/file_authorization.rb', line 19

def can_download_file?
  authorize_file_action(:download)
end

#can_upload_file?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/avo/fields/concerns/file_authorization.rb', line 11

def can_upload_file?
  authorize_file_action(:upload)
end