mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Change restriction redirect path
This commit is contained in:
parent
efd3e4a565
commit
f5c47b8327
2 changed files with 3 additions and 2 deletions
|
@ -12,7 +12,8 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
redirect_to admin_dashboard_path, alert: exception.message
|
||||
redirect_to admin_root_path, alert: exception.message if current_user.is_a?(AdminUser)
|
||||
redirect_to registrar_root_path, alert: exception.message if current_user.is_a?(ApiUser)
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(_resource)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue