-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Authentication
Benoit Bénézech edited this page Jan 2, 2014
·
7 revisions
You can (each is optional) provide 2 things:
- An
authenticate_with
block that will trigger your authentication logic before any action in RailsAdmin. - A
current_user_method
block that will yield a user model (for UI purposes)
Example for a standard Devise setup:
RailsAdmin.config do |config|
config.authenticate_with { warden.authenticate! scope: :user }
config.current_user_method &:current_user
end