Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Includes:
- HandleFaceting, JsonHelper, ManipulateNode, Searchable
- Defined in:
- frontend/app/controllers/application_controller.rb,
public/app/controllers/application_controller.rb
Direct Known Subclasses
AccessionsController, AgentsController, ArchivalObjectsController, ArkNameController, ArkUpdateController, AssessmentAttributesController, AssessmentsController, BatchDeleteController, BatchMergeController, BulkImportController, BulkImportTemplatesController, CiteController, ClassificationTermsController, ClassificationsController, CollectionManagementController, CollectionManagementRecordsController, ContainerProfilesController, ContainersController, CustomReportTemplatesController, DateCalculatorController, DigitalObjectComponentsController, DigitalObjectsController, EnumerationsController, EventsController, ExportsController, ExtentCalculatorController, GroupsController, IndexController, JobsController, LocalesController, LocationProfilesController, LocationsController, OaiConfigController, ObjectsController, PdfController, PreferencesController, RdeTemplatesController, RepositoriesController, RequestsController, ResolverController, ResourcesController, SearchController, SessionController, SpaceCalculatorController, SubjectsController, SystemInfoController, TestsController, TopContainersController, UpdateMonitorController, UsersController, UtilsController, WelcomeController
Constant Summary
Constants included from Searchable
Class Method Summary collapse
-
.can_access?(context, method) ⇒ Boolean
-
.permission_mappings ⇒ Object
-
.set_access_control(permission_mappings) ⇒ Object
Instance Method Summary collapse
Methods included from JsonHelper
#merge_notes, #process_json_notes
Methods included from Searchable
#default_search_opts, #get_filter_years, #handle_results, #html_notes, #process_results, #process_search_results, #repo_context, #search_terms, #set_up_advanced_search, #set_up_and_run_search, #set_up_search, #strip_facet_fields
Methods included from HandleFaceting
#fetch_only_facets, #get_pretty_facet_value, #strip_facets
Methods included from ManipulateNode
#inheritance, #process_mixed_content, #strip_mixed_content
Class Method Details
.can_access?(context, method) ⇒ Boolean
40 41 42 43 44 45 46 47 48 |
# File 'frontend/app/controllers/application_controller.rb', line 40 def self.can_access?(context, method) .each do |, actions| if actions.include?(method) && !session_can?(context, ) return false end end return true end |
.permission_mappings ⇒ Object
36 37 38 |
# File 'frontend/app/controllers/application_controller.rb', line 36 def self. Array() end |
.set_access_control(permission_mappings) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 |
# File 'frontend/app/controllers/application_controller.rb', line 51 def self.set_access_control() = skip_before_action :unauthorised_access, :only => Array(.values).flatten.uniq .each do |, actions| next if === :public before_action(:only => Array(actions)) {|c| user_must_have()} end end |
Instance Method Details
#archivesspace ⇒ Object
39 40 41 |
# File 'public/app/controllers/application_controller.rb', line 39 def archivesspace ArchivesSpaceClient.instance end |