Skip to content
Benoit Bénézech edited this page Jan 2, 2014 · 7 revisions

You can (each is optional) provide 2 things:

  1. An authenticate_with block that will trigger your authentication logic before any action in RailsAdmin.
  2. 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
Clone this wiki locally