Skip to content

Commit

Permalink
move sidekiq dashboard name to standardized "jobs", make accessible w…
Browse files Browse the repository at this point in the history
…ithin tenants
  • Loading branch information
orangewolf committed Aug 10, 2023
1 parent d8df909 commit dec1557
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def to_s
email
end

def is_admin
has_role? :admin
end

def is_superadmin
has_role? :superadmin
end
Expand Down
6 changes: 3 additions & 3 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

concern :iiif_search, BlacklightIiifSearch::Routes.new
concern :oai_provider, BlacklightOaiProvider::Routes.new

mount Hyrax::IiifAv::Engine, at: '/'
mount Riiif::Engine => 'images', as: :riiif if Hyrax.config.iiif_image_server?

authenticate :user, lambda { |u| u.is_superadmin } do
mount Sidekiq::Web => '/sidekiq'
authenticate :user, lambda { |u| u.is_superadmin || u.is_admin } do
mount Sidekiq::Web => '/jobs'
end

if ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYKU_MULTITENANT', false))
Expand Down

0 comments on commit dec1557

Please sign in to comment.