Skip to content

Juniper Upgrade - Reworked CMS Appsembler LoginView and MTE tests - #854

Merged
johnbaldwin merged 2 commits into
mainfrom
john/fix-studio-login
Mar 23, 2021
Merged

Juniper Upgrade - Reworked CMS Appsembler LoginView and MTE tests#854
johnbaldwin merged 2 commits into
mainfrom
john/fix-studio-login

Conversation

@johnbaldwin

Copy link
Copy Markdown
  • 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

https://appsembler.atlassian.net/browse/RED-1571

- 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
@OmarIthawi

Copy link
Copy Markdown

Thanks @johnbaldwin! I'll review that tomorrow noon. Here's what I will focus on:

  • Test on devstack with the multi-tenant email feature.
  • Check for things that would break on staging.
  • Test failures outside test_multi_tenant_with_login

@OmarIthawi OmarIthawi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@johnbaldwin
johnbaldwin merged commit 5844201 into main Mar 23, 2021
@johnbaldwin
johnbaldwin deleted the john/fix-studio-login branch March 23, 2021 13:33
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 40.195% when pulling 2ff2925 on john/fix-studio-login into 28483fe on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants