Module: Hyrax::Permissions::Readable

Extended by:
ActiveSupport::Concern
Included in:
Hyrax::Permissions, SolrDocumentBehavior
Defined in:
app/models/concerns/hyrax/permissions/readable.rb

Instance Method Summary collapse

Instance Method Details

#private?Boolean

Returns:

  • (Boolean)

13
14
15
# File 'app/models/concerns/hyrax/permissions/readable.rb', line 13

def private?
  !(public? || registered?)
end

#public?Boolean

Returns:

  • (Boolean)

5
6
7
# File 'app/models/concerns/hyrax/permissions/readable.rb', line 5

def public?
  read_groups.include?(Hydra::AccessControls::AccessRight::PERMISSION_TEXT_VALUE_PUBLIC)
end

#registered?Boolean

Returns:

  • (Boolean)

9
10
11
# File 'app/models/concerns/hyrax/permissions/readable.rb', line 9

def registered?
  read_groups.include?(Hydra::AccessControls::AccessRight::PERMISSION_TEXT_VALUE_AUTHENTICATED)
end