Skip to content

feat: replace enterprise_support with AccountSettingsReadOnlyFields#263

Merged
kiram15 merged 1 commit into
release-ulmofrom
kiram15/ENT-11510-1
May 12, 2026
Merged

feat: replace enterprise_support with AccountSettingsReadOnlyFields#263
kiram15 merged 1 commit into
release-ulmofrom
kiram15/ENT-11510-1

Conversation

@kiram15
Copy link
Copy Markdown

@kiram15 kiram15 commented May 5, 2026

Description

Removes the direct import of get_enterprise_readonly_account_fields from openedx.features.enterprise_support.utils in accounts/api.py and replaces it with a call to the AccountSettingsReadOnlyFieldsRequested openedx-filter. Adds the filter to OPEN_EDX_FILTERS_CONFIG. Updates tests to mock the filter instead of the old enterprise_support imports.

Supporting information

ENT-11510

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • If your database migration can't be rolled back easily.

Copilot AI review requested due to automatic review settings May 5, 2026 03:40
@kiram15 kiram15 changed the title feat: replace enterprise_support import with AccountSettingsReadOnlyF… feat: replace enterprise_support with AccountSettingsReadOnlyFields May 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the direct enterprise-support lookup in the LMS account settings API with an openedx-filters integration, then wires the corresponding filter into LMS settings so enterprise-specific read-only fields can be supplied through the filter pipeline instead of a hard import.

Changes:

  • Swaps the account-settings read-only-field logic from enterprise_support utility code to AccountSettingsReadOnlyFieldsRequested.
  • Adds a default LMS OPEN_EDX_FILTERS_CONFIG entry and production-time merge logic for YAML-provided filter config.
  • Updates account API tests to mock the new filter hook instead of the previous enterprise helper.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
requirements/edx/testing.txt Bumps openedx-filters in the testing lockfile.
requirements/edx/doc.txt Bumps openedx-filters in the docs lockfile.
requirements/edx/development.txt Bumps openedx-filters in the development lockfile.
openedx/core/djangoapps/user_api/accounts/tests/test_api.py Replaces enterprise-specific mocks/tests with filter-based mocking.
openedx/core/djangoapps/user_api/accounts/api.py Routes account read-only-field validation through AccountSettingsReadOnlyFieldsRequested.
lms/envs/production.py Adds special YAML merge handling for OPEN_EDX_FILTERS_CONFIG.
lms/envs/common.py Introduces the default LMS filter configuration for account-settings read-only fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread requirements/edx/development.txt
Comment thread lms/envs/production.py
Comment thread openedx/core/djangoapps/user_api/accounts/tests/test_api.py
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from ba7d562 to 8fd9988 Compare May 5, 2026 04:19
Copilot AI review requested due to automatic review settings May 5, 2026 04:27
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from 8fd9988 to 1ca2afd Compare May 5, 2026 04:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread openedx/core/djangoapps/user_api/accounts/tests/test_api.py
Comment thread openedx/core/djangoapps/user_api/accounts/tests/test_api.py Outdated
Comment thread openedx/core/djangoapps/user_api/accounts/tests/test_api.py
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from 1ca2afd to 9dcae8b Compare May 5, 2026 04:43
Copilot AI review requested due to automatic review settings May 5, 2026 04:58
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from 9dcae8b to 01dbd3d Compare May 5, 2026 04:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lms/envs/common.py Outdated
Comment thread lms/envs/production.py
Comment thread openedx/core/djangoapps/user_api/accounts/tests/test_api.py Outdated
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch 2 times, most recently from b46cd02 to d65a41b Compare May 5, 2026 05:43
Copilot AI review requested due to automatic review settings May 5, 2026 05:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lms/envs/production.py
Comment thread openedx/core/djangoapps/user_api/accounts/api.py
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from d65a41b to b2b879e Compare May 5, 2026 21:30
Copilot AI review requested due to automatic review settings May 6, 2026 17:13
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from b2b879e to 4c79537 Compare May 6, 2026 17:13
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch 2 times, most recently from 1dc5599 to e6dc283 Compare May 6, 2026 19:49
Comment thread lms/djangoapps/grades/events.py Outdated
Comment thread lms/envs/production.py Outdated
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from b7c2b64 to 722ca72 Compare May 7, 2026 15:40
Comment thread lms/envs/common.py
@pwnage101
Copy link
Copy Markdown
Member

Also---the upstream openedx-platform PR has a major bug. AccountSettingsReadOnlyFieldsStep was injected, but that does not exist. Just let me fix that in my PR: https://github.com/openedx/edx-enterprise/pull/2617/changes#diff-fe32336c82168a357cf150188e81c7b4fcf50d05dbfcc3e4ec0d22d40a3eadaf

@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch 3 times, most recently from 82d7469 to 544cb3e Compare May 12, 2026 22:48
…ieldsRequested filter

Removes the direct import of get_enterprise_readonly_account_fields from
openedx.features.enterprise_support.utils in accounts/api.py and replaces it
with a call to the AccountSettingsReadOnlyFieldsRequested openedx-filter.
Adds the filter to OPEN_EDX_FILTERS_CONFIG with the
enterprise.filters.accounts.AccountSettingsEnterpriseReadOnlyFieldsStep pipeline step.
Updates tests to mock the filter instead of the old enterprise_support imports.

ENT-11510

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kiram15 kiram15 force-pushed the kiram15/ENT-11510-1 branch from 544cb3e to 55f2e72 Compare May 12, 2026 22:56
@kiram15 kiram15 merged commit 1f8da26 into release-ulmo May 12, 2026
64 checks passed
@kiram15 kiram15 deleted the kiram15/ENT-11510-1 branch May 12, 2026 23:21
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