If launching an LTI 1.3 tool, use an LTI 1.3 user ID for the value of
the $Canvas.masqueradingUser.userId variable substition. Currently, an
LTI 1.1-style user ID is used regardless of the launching LTI tool
version.
flag=none
closes INTEROP-8421
Test plan:
- before checking out this commit:
- have an LTI 1.1 and LTI 1.3 tool, each with a custom variable with
"$Canvas.masqueradingUser.userId"
- masquerade as a different user launch an LTI 1.1 tool
- note the substituted custom variable value (40 character ID).
- after checking out this commit:
- unmasqueraded, launch each tool. The custom variable should remain
unexpanded.
- masquerade as another user and launch each tool.
- for LTI 1.1 tools, the variable should be 40 character ID from
before this commit.
- for LTI 1.3 tools, the variable should be a UUIDv4 value, equal to
`myadminuser.lookup_lti_id(context)` in a rails console.
Change-Id: Idde0234a6ae49abdd68231e314442230035c9c96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339038
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>