feat(admin-settings): allow_user_dashboards runtime gate#61
Merged
rubenvdlinde merged 2 commits intodevelopmentfrom Apr 30, 2026
Merged
Conversation
…er REQ-ASET-003 + 015
Implements REQ-ASET-003 (modified) runtime gating: when allow_user_dashboards flag
is OFF, POST /api/dashboards returns HTTP 403 with {status:'error',
error:'personal_dashboards_disabled', message:<translated>}.
- New PersonalDashboardsDisabledException (HTTP 403, stable error code)
- DashboardService::assertPersonalDashboardsAllowed() reads setting with default=false
- DashboardApiController::create() calls assert before permission checks; catches
exception and returns exact spec envelope; read/update/delete untouched
- i18n: English + Dutch strings in all four l10n files (json + js)
- PHPUnit: 7 tests covering envelope shape, readability/editability with flag off,
no-mutation guarantee, default-blocks-creation, defence-in-depth
- REQ-ASET-015 initial-state mirror already done in PR #45 (InitialStateBuilder);
skip per spec instruction
- Fork-side wiring deferred to fork-current-as-personal PR
- Pre-existing: fixed 13 phpcbf-auto-fixable blank-line errors in DashboardApiController
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 342/342 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-04-30 19:34 UTC
Download the full PDF report from the workflow artifacts.
This was referenced Apr 30, 2026
rubenvdlinde
added a commit
that referenced
this pull request
May 3, 2026
* feat(admin-settings): runtime gating on personal-dashboard creation per REQ-ASET-003 + 015
Implements REQ-ASET-003 (modified) runtime gating: when allow_user_dashboards flag
is OFF, POST /api/dashboards returns HTTP 403 with {status:'error',
error:'personal_dashboards_disabled', message:<translated>}.
- New PersonalDashboardsDisabledException (HTTP 403, stable error code)
- DashboardService::assertPersonalDashboardsAllowed() reads setting with default=false
- DashboardApiController::create() calls assert before permission checks; catches
exception and returns exact spec envelope; read/update/delete untouched
- i18n: English + Dutch strings in all four l10n files (json + js)
- PHPUnit: 7 tests covering envelope shape, readability/editability with flag off,
no-mutation guarantee, default-blocks-creation, defence-in-depth
- REQ-ASET-015 initial-state mirror already done in PR #45 (InitialStateBuilder);
skip per spec instruction
- Fork-side wiring deferred to fork-current-as-personal PR
- Pre-existing: fixed 13 phpcbf-auto-fixable blank-line errors in DashboardApiController
* chore: update SBOM
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
Summary
Implements REQ-ASET-003 (modified) + REQ-ASET-015 (added) per spec on development. Adds PersonalDashboardsDisabledException + DashboardService::assertPersonalDashboardsAllowed() + controller guard on create(). Existing personal dashboards remain fully usable; only creation is blocked when flag is off. Initial-state push already done by PR #45. PHPUnit covers envelope shape, no-mutation, defence-in-depth. Fork-side wiring deferred to fork-current-as-personal PR.
PersonalDashboardsDisabledException(HTTP 403, stable error codepersonal_dashboards_disabled)DashboardService::assertPersonalDashboardsAllowed()reads flag withdefault=false(missing row = blocked per spec)create()only; 403 envelope exactly:{status:'error', error:'personal_dashboards_disabled', message:<translated>}Test plan