Sha256: 03521cea0019f0fc2bc069f93e937c3ea3616d50a4081669c750a85c059d59c5

Contents?: true

Size: 734 Bytes

Versions: 25

Compression:

Stored size: 734 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Admin
    module UsersControllerBehavior
      extend ActiveSupport::Concern
      include Blacklight::SearchContext
      included do
        before_action :ensure_admin!
        with_themed_layout 'dashboard'
      end

      # Display admin menu list of users
      def index
        add_breadcrumb t(:'hyrax.controls.home'), root_path
        add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path
        add_breadcrumb t(:'hyrax.admin.users.index.title'), hyrax.admin_users_path
        @presenter = Hyrax::Admin::UsersPresenter.new
      end

      private

      def ensure_admin!
        authorize! :read, :admin_dashboard
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-5.0.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-5.0.0.rc3 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-5.0.0.rc2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-5.0.0.rc1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.6.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-4.0.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-4.0.0.rc3 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-4.0.0.rc2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-4.0.0.rc1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.5.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-4.0.0.beta2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.4.2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-4.0.0.beta1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.4.1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.4.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.3.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.2.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.1.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-3.0.2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb