tl-its-umich-edu / canvas-lti-redirect-tool

Canvas LTI Redirect Tool
Apache License 2.0
1 stars 4 forks source link

redirect users to Maizey endpoint (iss. #15) #16

Closed pushyamig closed 2 months ago

pushyamig commented 2 months ago

Fixes #15

The users are now redirect to the Maizey endpoint for the LTI launch.

If the user is a super user then, user will be displayed home page so that they can have access to Django Admin view. Otherwise they will be redirected Maizey URL with JWT.

Note: After implementing CSP the workflow with redirect might slightly change.

Input needed on this: we could continue conversation in slack. But I want to start the conversation here.

  1. Also I am starting to think if we even needs to login every user who launched our redirect tool. Since goal for the ET team have the tool in front of all students in the coming Fall term. (So why do we need those user in Django table?)
  2. We might at the least need to login the user who need Django admin console access. Who are mostly going to be TL-Dev. We could recognize then with one of the LTI custom Launch variable `is_root_account_user'

Testing:

  1. Test as user who has access to Django admin console
  2. Test as Student or another role is fine as well. only thing is user role should not have a super user access.
pushyamig commented 2 months ago

Here is the code where the user is logging the users to Django auth backend. The approach is similar to Myla https://github.com/tl-its-umich-edu/canvas-lti-redirect-tool/blob/main/lti_redirect/views.py#L38