mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Strip return to path
This commit is contained in:
parent
5f2e0619e5
commit
d94d50a174
2 changed files with 4 additions and 11 deletions
|
@ -16,18 +16,12 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_sign_in_path_for(_resource)
|
def after_sign_in_path_for(_resource)
|
||||||
if session[:user_return_to]
|
rt = session[:user_return_to].to_s.presence
|
||||||
return session[:user_return_to].to_s
|
return session[:user_return_to].to_s if rt && rt != admin_login_path
|
||||||
end
|
admin_dashboard_path
|
||||||
|
|
||||||
if request.path.match('registrar')
|
|
||||||
registrar_invoices_path
|
|
||||||
elsif request.path.match('admin')
|
|
||||||
admin_dashboard_path
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_sign_out_path_for(_resource)
|
def after_sign_out_path_for(_resource)
|
||||||
if request.path.match('registrar')
|
if request.path.match('registrar')
|
||||||
registrar_login_path
|
registrar_login_path
|
||||||
elsif request.path.match('admin')
|
elsif request.path.match('admin')
|
||||||
|
|
|
@ -11,7 +11,6 @@ class Registrar::SessionsController < SessionsController
|
||||||
end
|
end
|
||||||
|
|
||||||
def login
|
def login
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def login_mid
|
def login_mid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue