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.
This commit is contained in:
6
app/controllers/admin/base_controller.rb
Normal file
6
app/controllers/admin/base_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class Admin::BaseController < ApplicationController
|
||||
|
||||
before_action :authenticate_user!
|
||||
before_action :authorize_admin
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user