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,16 +16,10 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def after_sign_in_path_for(_resource)
|
||||
if session[:user_return_to]
|
||||
return session[:user_return_to].to_s
|
||||
end
|
||||
|
||||
if request.path.match('registrar')
|
||||
registrar_invoices_path
|
||||
elsif request.path.match('admin')
|
||||
rt = session[:user_return_to].to_s.presence
|
||||
return session[:user_return_to].to_s if rt && rt != admin_login_path
|
||||
admin_dashboard_path
|
||||
end
|
||||
end
|
||||
|
||||
def after_sign_out_path_for(_resource)
|
||||
if request.path.match('registrar')
|
||||
|
|
|
@ -11,7 +11,6 @@ class Registrar::SessionsController < SessionsController
|
|||
end
|
||||
|
||||
def login
|
||||
|
||||
end
|
||||
|
||||
def login_mid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue