-
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make “root” a reserved key for Contexts (#16475)
### What does it do? 1. Prevents "root" from being specified as a Context key. 2. Slightly refactors the `Create->beforeSave() `error testing conditional to use a `switch` statement so only relevant code will execute in that block. 3. Additionally, in the second commit, leverages the newly-added `RESERVED_KEYS` constant (in the `modContext` base class) in the Context processor `GetList` class. ### Why is it needed? The keyword "root" is used as the default id for all trees in the core. As such, attempting to create a Context with that key results in errors in the rendering of the Resources tree. ### How to test Attempt to create a new Context with the key "root." You should receive an error message indicating the key is reserved. ### Related issue(s)/PR(s) Resolves #16457
- Loading branch information
Showing
4 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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