Add support for drawer permission groups#242
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial JSON API support for managing drawer permission groups, and refactors shared “group type” logic so both instance groups (AdminPermissions) and drawer groups use a common catalog.
Changes:
- Introduces
DrawerPermissionscontroller endpoints for listing/creating/updating/deleting a user’s drawer groups, plus catalog and manageable-drawers endpoints. - Extracts built-in + auth-helper group type logic into
GroupTypeCatalogand updatesAdminPermissionsto use it. - Improves validation helpers (
regexrobustness + newnotRegex), movesfirstOrProvisionRemoteUser()toInstance_Controller, and adds JSON serialization toDrawerGroup.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| application/controllers/DrawerPermissions.php | New JSON API controller for drawer group/type/drawer listing and CRUD. |
| application/libraries/GroupTypeCatalog.php | Centralizes built-in + auth-helper group type metadata and helper methods. |
| application/controllers/AdminPermissions.php | Replaces in-controller group type logic with GroupTypeCatalog; updates related checks. |
| application/core/Instance_Controller.php | Adds shared firstOrProvisionRemoteUser() for controllers that need remote-user provisioning. |
| application/models/Entity/DrawerGroup.php | Adds JsonSerializable payload (mirrors InstanceGroup style). |
| application/libraries/SimpleValidator.php | Adds notRegex() and hardens regex() against non-string inputs. |
| application/libraries/MockAuthHelper.php | Stops auto-marking newly created remote users as super admins. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jxjj
marked this pull request as ready for review
July 10, 2026 23:17
cmcfadden
approved these changes
Jul 11, 2026
jxjj
added a commit
that referenced
this pull request
Jul 14, 2026
* develop: Add support for drawer permission groups (#242)
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.
Initial support for drawer permissions and groups. This slice contains just the groups stuff.
DrawerPermissionscontroller.firstOrProvisionRemoteUser()method to Instance_ControllernotRegexhelper to the SimpleValidator class (some ride-along reformatting, sry)