feat: Prevent saving preferences and status when impersonating (#11164)

This PR will prevent saving user preferences and online status when impersonating. Previously, these settings could be updated during impersonation, causing the user to see a different view or UI settings.

Fixes https://linear.app/chatwoot/issue/CW-4163/impersonation-improvements
This commit is contained in:
Sivin Varghese
2025-05-21 06:04:30 +05:30
committed by GitHub
parent 27ec791353
commit 2ee63656e2
13 changed files with 270 additions and 5 deletions

View File

@@ -20,6 +20,10 @@ module SsoAuthenticatable
"#{ENV.fetch('FRONTEND_URL', nil)}/app/login?email=#{encoded_email}&sso_auth_token=#{generate_sso_auth_token}"
end
def generate_sso_link_with_impersonation
"#{generate_sso_link}&impersonation=true"
end
private
def sso_token_key(token)