Skip to content

Add support for drawer permission groups#242

Merged
jxjj merged 11 commits into
developfrom
feat/drawer-groups-api
Jul 11, 2026
Merged

Add support for drawer permission groups#242
jxjj merged 11 commits into
developfrom
feat/drawer-groups-api

Conversation

@jxjj

@jxjj jxjj commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Initial support for drawer permissions and groups. This slice contains just the groups stuff.

  • new endpoints in DrawerPermissions controller.
  • extract group type helpers common to drawer groups and instance groups to a GroupTypeCatalog class.
  • move shared firstOrProvisionRemoteUser() method to Instance_Controller
  • add jsonSerialize to DrawerGroup
  • add a notRegex helper to the SimpleValidator class (some ride-along reformatting, sry)

@jxjj
jxjj requested a review from Copilot July 10, 2026 22:59
@jxjj jxjj self-assigned this Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 DrawerPermissions controller 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 GroupTypeCatalog and updates AdminPermissions to use it.
  • Improves validation helpers (regex robustness + new notRegex), moves firstOrProvisionRemoteUser() to Instance_Controller, and adds JSON serialization to DrawerGroup.

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.

Comment thread application/controllers/DrawerPermissions.php
Comment thread application/controllers/DrawerPermissions.php
@jxjj
jxjj marked this pull request as ready for review July 10, 2026 23:17
@jxjj
jxjj requested a review from cmcfadden July 10, 2026 23:17
@jxjj
jxjj merged commit ebcdd94 into develop Jul 11, 2026
2 checks passed
@jxjj
jxjj deleted the feat/drawer-groups-api branch July 11, 2026 17:07
jxjj added a commit that referenced this pull request Jul 14, 2026
* develop:
  Add support for drawer permission groups (#242)
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