This repository was archived by the owner on May 29, 2026. It is now read-only.
feat(security): ADR-023 action authorization reference (ActionAuthService + admin matrix UI)#310
Merged
Merged
Conversation
…in matrix UI + wire Dashboard/Widget controllers)
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 414/414 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-26 09:57 UTC
Download the full PDF report from the workflow artifacts.
This was referenced May 26, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Reference implementation of ADR-023 action-level authorization on MyDash. Ports the kit that lived only in
nextcloud-app-template, adds the missing admin matrix UI, and wiresrequireAction()into the two biggest controllers.Backend kit (ported from
nextcloud-app-template)lib/Service/ActionAuthService.php—requireAction()/can()/getMatrix()/setMatrix()/getAllowedGroups()/getActions(); admins always pass, matrix stored inIAppConfigunder keyactions, default-deny.lib/Repair/InitializeActions.php— seeds the matrix on install/upgrade, preserving any admin customization. Registered inappinfo/info.xml<repair-steps>(<install>+<post-migration>).lib/actions.seed.json— full 74-action taxonomy generated from the gate-7 scan (every flagged controller method,domain.verbkebab-case), every value defaults to["admin"](ADR-023 safe posture).Admin matrix API + UI
lib/Controller/ActionMatrixController.php—GET/PUT /api/admin/action-matrix, both gated by#[AuthorizedAdminSetting(mydash)](admin-only at the middleware layer, no in-body check). GET returns{matrix, actions (union of matrix + seed keys), groups}.src/components/admin/ActionAuthMatrix.vue— table editor (one row per action, one column per group,NcCheckboxRadioSwitchper cell;admincolumn always-on/disabled). Mounted as a new section inAdminSettings.vue. Newapi.getActionMatrix()/api.updateActionMatrix()helpers.Wired controllers (the core)
DashboardApiController+WidgetApiControllernow injectIUserSession+ActionAuthService. Governance/shared mutations are gated viarequireAction(); reads + personal-preference writes get an authentication check only (data RBAC scopes them via OpenRegister).Gated (requireAction):
update→dashboard.update,delete→dashboard.delete,activate→dashboard.activate,publish→dashboard.publish,unpublish→dashboard.unpublish,schedule→dashboard.scheduleaddWidget→widget.add-widget,addTile→widget.add-tile,updatePlacement→widget.update-placement,removePlacement→widget.remove-placementAuth-check only (reads / personal prefs): Dashboard
list,visible,getActive,show,tree,byPath,computePath,listGroup,getGroup,setActiveDashboard,setDefaultDashboard,getDefaultDashboard,viewEvent; WidgetlistAvailable,getItems,newsItems,calendarEvents.Verification
composer install✅;php -lclean on all 5 changed/new PHP files.phpcsclean on the 3 new files; the 2 edited controllers match their exact pre-existing baselines (Dashboard 123, Widget 21 — zero net new violations).no-admin-idor): 74 → 47 findings; DashboardApiController + WidgetApiController now fully clean (−27).npm ci+npm run build✅ exit 0 (only pre-existing size/floating-vue warnings). Nopackage-lockchurn staged.Follow-up
The matrix defaults admin-only (ADR-023 safe posture); admins broaden via the new UI. Wiring
requireAction()into the remaining 17 controllers (47 methods) is a tracked follow-up: DashboardTranslationApiController (6), MetadataAdminController (5), TileApiController (4), RuleApiController (4), DashboardVersionApiController (4), DashboardReactionApiController (4), AnalyticsController (4), ResourceServeController (2), ResourceController (2), DashboardMetadataController (2), DashboardLockApiController (2), DashboardCommentsApiController (2), AdminOrgNavigationController (2), TemplateController (1), PeopleWidgetController (1), ManifestController (1), AdminController (1).Note: NO Co-Authored-By trailer.