mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Registrar refactor
This commit is contained in:
parent
6573d81b94
commit
ec4c06bb06
95 changed files with 564 additions and 539 deletions
16
lib/devise_custom_failure.rb
Normal file
16
lib/devise_custom_failure.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
class DeviseCustomFailure < Devise::FailureApp
|
||||
def redirect_url
|
||||
return registrar_login_url if request.original_fullpath.to_s.match(/^\/registrar/)
|
||||
return admin_login_url if request.original_fullpath.to_s.match(/^\/admin/)
|
||||
root_url
|
||||
end
|
||||
|
||||
# You need to override respond to eliminate recall
|
||||
def respond
|
||||
if http_auth?
|
||||
http_auth
|
||||
else
|
||||
redirect
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue