feat: add management command to apply the theam editor feat in the dashboard #359
Merged
feat: add management command to apply the theam editor feat in the dashboard #359
Conversation
There was a problem hiding this comment.
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_accessmanagement 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.
… and ConfigMirror entries
2c90103 to
6bb521c
Compare
6bb521c to
c67a09b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
add_config_access.pythat creates or updatesConfigAccessControlentries for theme-related configuration keys andConfigMirrorentries for platform name mirroring. The command uses atomic transactions for safe database updates and provides clear output on created/updated entries.__init__.pyfiles for better documentation and clarity of the management command modules. [1] [2]Testing:
test_add_config_access.pyto verify that the management command correctly creates and updatesConfigAccessControlandConfigMirrorentries, ensuring expected behavior for both new and existing records.