This repository was archived by the owner on May 29, 2026. It is now read-only.
fix(security): force:false in repair step + server-side project creation policy#283
Merged
rubenvdlinde merged 1 commit intoMay 28, 2026
Merged
Conversation
…ion policy (C2 + H2) C2: InitializeSettings::run uses force:false (not force:true) so the repair step respects already-configured OR schema IDs and does not overwrite operator customisations on every install/upgrade. This was regressed on development when the retrofit spec added force:true; main was already correct. H2: allow_project_creation is now enforced server-side: - SettingsService::canCurrentUserCreateProject() reads the policy config key and returns false for non-admins when the policy is 'admins'. - ProjectController::checkCreatePolicy() exposes GET /api/projects/check-create-policy returning 200/403; requires @NoAdminRequired (authenticated user call). - ProjectCreationDialog::submit() calls the policy gate before delegating to OR, so a user who bypasses the client-side canCreateProject guard still receives a 403 from the server.
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.
Summary
InitializeSettings::run— changeforce: trueback toforce: false. The repair step must respect already-configured OR schema IDs and not overwrite operator customisations on every install/upgrade. PR fix: use force:false in repair step to prevent overwriting operator schema customisations #281 fixed this onmain; this PR brings the fix todevelopment.allow_project_creationis now enforced server-side as defence-in-depth:SettingsService::canCurrentUserCreateProject()reads the policy key and returns false for non-admins when the setting is'admins'ProjectController::checkCreatePolicy()exposesGET /api/projects/check-create-policy(200 = allowed, 403 = forbidden);@NoAdminRequired— authenticated user callProjectCreationDialog::submit()calls the policy gate before delegating to OR so users who bypass the client-sidecanCreateProjectguard still receive a 403Test plan
php -lon all modified PHP files — cleanforce:falseverified in InitializeSettings — no regression on fresh install (first run still imports because OR IDs are absent)allow_project_creation=admins: non-admin user's ProjectCreationDialog is blocked server-side (403)allow_project_creation=all(default): any authenticated user can still create projects