Module: CurationConcerns::Permissions::Writable

Extended by:
ActiveSupport::Concern
Includes:
Hydra::AccessControls::Permissions, Hydra::AccessControls::Visibility
Included in:
CurationConcerns::Permissions
Defined in:
app/models/concerns/curation_concerns/permissions/writable.rb

Instance Method Summary collapse

Instance Method Details

#paranoid_permissionsObject



21
22
23
24
25
26
27
28
29
30
# File 'app/models/concerns/curation_concerns/permissions/writable.rb', line 21

def paranoid_permissions
  valid = true
  paranoid_edit_permissions.each do |validation|
    next unless validation[:condition].call(self)
    errors[validation[:key]] ||= []
    errors[validation[:key]] << validation[:message]
    valid = false
  end
  valid
end