Juniper Upgrade - Reworked CMS Appsembler LoginView and MTE tests - #854
Conversation
- Updated cms.djangoaps.appsembler.views.py to enable login to user accounts that have a course access role authorizing Stuio access or user accounts that have global staff or superuser privileges - Update MTE login tests to work with the new Studio local login functionality
|
Thanks @johnbaldwin! I'll review that tomorrow noon. Here's what I will focus on:
|
There was a problem hiding this comment.
Thanks a lot @johnbaldwin for taking on this task! It works on devstack and I think it'll work on staging as well. As you've suggested, please skip the tests (or just merge #858), merge and deploy on Juniper staging.
No further edits needed here. We can take another look by the end of this Sprint so we can put this feature behind and focus on other issues.
|
|
||
| user_model = get_user_model() | ||
| try: | ||
| user = user_model.objects.get(email=self.request.POST['email']) |
There was a problem hiding this comment.
Please do not edit yet, but a note that should be addressed before shipping to production.
user_model.objects.get(email=self.request.POST['email']) will fail for our CSMs who have learner account in a customer and author account in Appsembler Academy.
The solution for this is to filter the users by role before using get().
This commit adds custom urlpatterns handling for the MTE Studio login tests. See the docstring for the test module in this commit.
https://appsembler.atlassian.net/browse/RED-1571