Feature: Introduce Super Admins (#705)
* Feature: Introduce Super Admins - added new devise model for super user - added administrate gem - sample dashboards for users and accounts Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
16
app/controllers/super_admin/application_controller.rb
Normal file
16
app/controllers/super_admin/application_controller.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# All Administrate controllers inherit from this
|
||||
# `Administrate::ApplicationController`, making it the ideal place to put
|
||||
# authentication logic or other before_actions.
|
||||
#
|
||||
# If you want to add pagination or other controller-level concerns,
|
||||
# you're free to overwrite the RESTful controller actions.
|
||||
class SuperAdmin::ApplicationController < Administrate::ApplicationController
|
||||
# authenticiation done via devise : SuperAdmin Model
|
||||
before_action :authenticate_super_admin!
|
||||
|
||||
# Override this value to specify the number of elements to display at a time
|
||||
# on index pages. Defaults to 20.
|
||||
# def records_per_page
|
||||
# params[:per_page] || 20
|
||||
# end
|
||||
end
|
||||
Reference in New Issue
Block a user