Class: CurationConcerns::AdminSetSearchBuilder

Inherits:
SearchBuilder
  • Object
show all
Defined in:
app/search_builders/curation_concerns/admin_set_search_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(context, access) ⇒ AdminSetSearchBuilder

Returns a new instance of AdminSetSearchBuilder.



3
4
5
6
# File 'app/search_builders/curation_concerns/admin_set_search_builder.rb', line 3

def initialize(context, access)
  @access = access
  super(context)
end

Instance Method Details

#discovery_permissionsObject

Overrides Hydra::AccessControlsEnforcement



14
15
16
17
18
19
20
# File 'app/search_builders/curation_concerns/admin_set_search_builder.rb', line 14

def discovery_permissions
  if @access == :edit
    @discovery_permissions ||= ["edit"]
  else
    super
  end
end

#modelsObject

This overrides the models in FilterByType



9
10
11
# File 'app/search_builders/curation_concerns/admin_set_search_builder.rb', line 9

def models
  [::AdminSet]
end