Sha256: d494b760c7b63b4ff7a6f461e9d26573c6fddc1c837a8e8a23fb54fc805dd6f6

Contents?: true

Size: 698 Bytes

Versions: 12

Compression:

Stored size: 698 Bytes

Contents

module Hyrax
  module Admin
    module UsersControllerBehavior
      extend ActiveSupport::Concern
      include Blacklight::SearchContext
      included do
        before_action :ensure_admin!
        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

12 entries across 12 versions & 1 rubygems

Version Path
hyrax-2.0.3 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.rc3 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.rc2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.rc1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.beta5 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.beta4 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.beta3 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.beta2 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
hyrax-2.0.0.beta1 app/controllers/concerns/hyrax/admin/users_controller_behavior.rb