akkounts/config/routes.rb
Sebastian Kippe f0312cb8e7
Authorize access to admin panel, etc.
Adds a separate admin namespace and base controller, with authorization
by looking up the admin property in the user's LDAP account.
2020-11-18 00:22:44 +01:00

22 lines
555 B
Ruby

Rails.application.routes.draw do
devise_for :users
get 'settings', to: 'settings#index'
post 'settings_reset_password', to: 'settings#reset_password'
get 'welcome', to: 'welcome#index'
get 'check_your_email', to: 'welcome#check_your_email'
namespace :admin do
root to: 'dashboard#index'
get 'ldap_users', to: 'ldap_users#index'
end
# Letter Opener (open "sent" emails in dev and staging)
if Rails.env.match(/staging|development/)
mount LetterOpenerWeb::Engine, at: "letter_opener"
end
root to: 'dashboard#index'
end