-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling Admin User #23
Comments
Assuming that you want special authentication behaviour for admin users, you would typically create a separate Rodauth configuration with a diffferent route prefix: class RodauthApp < Rodauth::Rails::App
# main users
configure do
# ...
end
# admin users
configure(:admin) do
enable ... # admin features
prefix "/admin"
end
route do |r|
# ...
r.rodauth
r.on("admin") { r.rodauth(:admin) } # route admin authentication requests
# ...
end
end You should be able to reuse the main configure(:admin) do
# ...
accounts_table :admin_accounts
password_hash_table :admin_account_password_hashes
# ... and so on ...
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In devise when I want to have admin users, I create a separate model
AdminUser
.How do I handle that here?
The text was updated successfully, but these errors were encountered: