1
0

refactor: fix 7 CRUD system inconsistencies for robustness and maintainability

- Add user-assignment dependency check to DepartmentService.deleteByUuid (409 when users assigned)
- Standardize POST detection to isMethod('POST') in 10 create/edit actions
- Align RoleService code uniqueness to warning pattern (matching departments)
- Normalize repository create() return types from mixed to int|false (3 repos + 3 interfaces)
- Add JSON response branches to 4 non-user delete actions
- Document delete authorization ordering pattern
- Decompose AdminSettingsService.updateFromAdmin into domain-scoped private methods

Workflow: .agents/runs/CRUD-CONSISTENCY-001/
Reviewed by: Code Reviewer (pass), Security Reviewer (pass), Acceptance Tester (pass)
Quality gates: QG-001 PHPUnit pass, QG-002 PHPStan pass, QG-003 Architecture pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-22 18:25:33 +01:00
parent 984d0430d3
commit c429ff43cd
29 changed files with 495 additions and 207 deletions

View File

@@ -514,6 +514,7 @@
"Department not found": "Abteilung nicht gefunden",
"Department can not be created": "Abteilung kann nicht erstellt werden",
"Department can not be updated": "Abteilung kann nicht aktualisiert werden",
"Department can not be deleted while users are assigned": "Abteilung kann nicht gelöscht werden, solange Benutzer zugewiesen sind",
"Delete this department?": "Diese Abteilung wirklich löschen?",
"Delete department": "Abteilung löschen",
"This will permanently delete this department.": "Diese Abteilung wird dauerhaft gelöscht.",

View File

@@ -514,6 +514,7 @@
"Department not found": "Department not found",
"Department can not be created": "Department can not be created",
"Department can not be updated": "Department can not be updated",
"Department can not be deleted while users are assigned": "Department can not be deleted while users are assigned",
"Delete this department?": "Delete this department?",
"Delete department": "Delete department",
"This will permanently delete this department.": "This will permanently delete this department.",