mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Context switching for client
This commit is contained in:
parent
5dfee40b87
commit
b48b91878d
9 changed files with 44 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
|||
class ClientController < ApplicationController
|
||||
helper_method :current_registrar
|
||||
|
||||
def current_registrar
|
||||
return Registrar.find(session[:current_user_registrar_id]) if current_user.admin?
|
||||
current_user.registrar
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue