Sha256: c0afe608430295d4396f5729c9e9b7560c032c5028e3181878d64f3715569bc7
Contents?: true
Size: 894 Bytes
Versions: 13
Compression:
Stored size: 894 Bytes
Contents
module CurationConcerns module AdminControllerBehavior extend ActiveSupport::Concern included do include AdminPage before_action :require_permissions end def index @resource_statistics = @configuration.fetch(:data_sources).fetch(:resource_stats).new render 'index' end def search_builder @search_builder ||= ::CatalogController.new.search_builder end def repository @repository ||= ::CatalogController.new.repository end def workflow @status_list = CurationConcerns::Workflow::StatusListService.new(current_user) end private def require_permissions authorize! :read, :admin_dashboard end # Loads the index action if it's only defined in the configuration. def action_missing(action) index if @configuration[:actions].include?(action) end end end
Version data entries
13 entries across 13 versions & 1 rubygems