mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Change current_user to current_registrant_user inside the Registrant API
This commit is contained in:
parent
8aa8aea24e
commit
e47248e5a3
2 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ module Api
|
|||
decryptor.decrypt_token
|
||||
|
||||
if decryptor.valid?
|
||||
sign_in decryptor.user
|
||||
sign_in(:registrant_user, decryptor.user)
|
||||
else
|
||||
render json: { errors: [{ base: ['Not authorized'] }] },
|
||||
status: :unauthorized
|
||||
|
@ -47,7 +47,7 @@ module Api
|
|||
# This controller does not inherit from ApplicationController,
|
||||
# so user_for_paper_trail method is not usable.
|
||||
def set_paper_trail_whodunnit
|
||||
::PaperTrail.whodunnit = current_user.id_role_username
|
||||
::PaperTrail.whodunnit = current_registrant_user.id_role_username
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue