Skip to content

Conversation

@mkurkar
Copy link
Collaborator

@mkurkar mkurkar commented Nov 28, 2025

This pull request introduces a new Django management command to automate the creation and updating of configuration access controls and mirror entries for the dashboard theme editor. It also adds test coverage for the command to ensure reliability and correctness.

Management Command Implementation:

  • Added a new management command in add_config_access.py that creates or updates ConfigAccessControl entries for theme-related configuration keys and ConfigMirror entries for platform name mirroring. The command uses atomic transactions for safe database updates and provides clear output on created/updated entries.
  • Included module-level docstrings in __init__.py files for better documentation and clarity of the management command modules. [1] [2]

Testing:

  • Added a comprehensive test suite in test_add_config_access.py to verify that the management command correctly creates and updates ConfigAccessControl and ConfigMirror entries, ensuring expected behavior for both new and existing records.
image

Copy link

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 pull request introduces a Django management command to automate the setup of configuration access controls for the dashboard theme editor. The command creates/updates ConfigAccessControl entries that define which theme configuration keys can be accessed and modified through the dashboard, along with ConfigMirror entries that handle platform name mirroring across different language settings.

Key Changes:

  • Added add_config_access management command to programmatically create configuration access control entries
  • Comprehensive test suite covering command functionality for both creation and update scenarios
  • Module-level documentation in management command package files

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
futurex_openedx_extensions/helpers/management/commands/add_config_access.py New management command that creates/updates ConfigAccessControl and ConfigMirror entries with atomic transactions
tests/test_helpers/test_add_config_access.py Test suite verifying command correctly handles creation and updates of configuration entries
futurex_openedx_extensions/helpers/management/__init__.py Added module docstring for management commands package
futurex_openedx_extensions/helpers/management/commands/__init__.py Added module docstring for commands subpackage

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

@shadinaif shadinaif force-pushed the mkurkar/automate-config-mirrors branch from 2c90103 to 6bb521c Compare December 7, 2025 13:15
Copy link
Collaborator

@shadinaif shadinaif left a comment

Choose a reason for hiding this comment

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

Thank you @mkurkar

I added course_categories to it too

@shadinaif shadinaif force-pushed the mkurkar/automate-config-mirrors branch from 6bb521c to c67a09b Compare December 7, 2025 13:17
@shadinaif shadinaif merged commit d91ea94 into main Dec 7, 2025
3 checks passed
@shadinaif shadinaif deleted the mkurkar/automate-config-mirrors branch December 7, 2025 13:23
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