Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
When system generates context it switches users and invokes hook_logout
and hook_login
. If there is a SSO module which performs redirect on hook_logout
then context generation process will be broken.
Proposed solution
Provide "Silent user switching" setting on provider settings form which will avoid invokation of listed above hooks.
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff-8-10.diff | 1023 bytes | Loparev |
#10 | tmgmt_smartling-sso_compatability-2863564-10.diff | 8.95 KB | Loparev |
#9 | interdiff-6-8.diff | 1.67 KB | Loparev |
#9 | tmgmt_smartling-sso_compatability-2863564-8.diff | 8.93 KB | Loparev |
#6 | interdiff-2-6.diff | 3.87 KB | Loparev |
Comments
Comment #2
Loparev CreditAttribution: Loparev commentedHere is a patch.
What I've tested:
1. Context debug form:
+ 1.1. Silent switching is off: hooks are invoked - ok
+ 1.2. Silent switching is on: hooks aren't invoked - ok
2. Send context action:
+ 2.1. Silent switching is off: hooks are invoked - ok
+/- 2.2. Silent switching is on: hooks aren't invoked - ok, but there was no context in Smartling dashboard (in recent log messages was message "Context upload for file @file completed successfully."). I think it's problem with context service.
3. Queue worker send context action:
+ 3.1. Silent switching is off: hooks are invoked - ok
+ 3.2. Silent switching is on: hooks aren't invoked - ok
Comment #3
Loparev CreditAttribution: Loparev commentedTested 2.2 once again - everything is ok.
Comment #4
Soul88This way we retrieve username only from the first "Smartling" provider
Title: Context silent user authentication
Description: "If checked, Smartling won't trigger hook_login and hook_logout during user authentication for retrieving context."
Comment #5
Soul88"A redirect response object." string duplication
If we retrieve settings this way, they will always come from the "main" Smartling translation provider.
Comment #6
Loparev CreditAttribution: Loparev commentedComment #7
Loparev CreditAttribution: Loparev commentedComment #8
Loparev CreditAttribution: Loparev commentedComment #9
Loparev CreditAttribution: Loparev commentedComment #10
Loparev CreditAttribution: Loparev commentedComment #11
Soul88Looks good
Comment #13
Soul88