Skip to content

[BB-6438] Check if feature is enabled before calling enterprise api - #485

Merged
pkulkark merged 1 commit into
opencraft-release/maple.3from
pooja/fix-page-banner-messages
Jul 7, 2022
Merged

[BB-6438] Check if feature is enabled before calling enterprise api#485
pkulkark merged 1 commit into
opencraft-release/maple.3from
pooja/fix-page-banner-messages

Conversation

@pkulkark

@pkulkark pkulkark commented Jul 5, 2022

Copy link
Copy Markdown
Member

Description

This PR fixes the issue of django messages being read before redirecting to dashboard page, due to enterprise api being
called even if the feature is disabled. Before maple release, there used to be a waffle switch named ENABLE_MULTIPLE_USER_ENTERPRISES_FEATURE that was checked before calling the api. This was deprecated in edx-platform#28057 but was not replaced by any other check for enterprise integration. And so after each login, the enterprise api would be called, which would return 404 but was fetching the django messages (which clears it) and so page banner messages wouldn't show up when the user was redirected to the dashboard page.

Supporting Information

JIRA: BB-6438

Testing Instructions

  1. Deploy this branch
  2. Create a new user account and activate it
  3. In lms.yml and studio.yml files, under AUTH_PASSWORD_VALIDATORS update the minimum password length requirement to longer than the one you set in the previous step.
  4. Ensure you enable the complaince check by the setting the following config and restart the services:
PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG:
    ENFORCE_COMPLIANCE_ON_LOGIN: true
    GENERAL_USER_COMPLIANCE_DEADLINE: '2022-08-01 00:00:00+00:00'
  1. Now login with the same user credentials and verify that the warning message is seen on the dashboard.

This fixes the issue of django messages being read before
redirecting to dashboard page, due to enterprise api being
called even if the feature is disabled.
@pkulkark
pkulkark requested a review from navinkarkera July 5, 2022 10:09
@pkulkark pkulkark self-assigned this Jul 5, 2022

@navinkarkera navinkarkera left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

  • I tested this on sandbox
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@pkulkark
pkulkark merged commit ca32428 into opencraft-release/maple.3 Jul 7, 2022
@Agrendalath
Agrendalath deleted the pooja/fix-page-banner-messages branch August 9, 2022 18:20
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.

2 participants