forked from fa/breadcrumb-the-shire
fix(helpdesk): repair security-level persistence, enrichment, and list UX
Saving security levels appeared broken in both the domain detail view and the domains grid. Root causes: - Repository never unwrapped MintyPHP DB rows (nested by table name), so reads always returned defaults even though writes succeeded. - Batch queries bound tenant_id last while SQL expected it first, so list/detail enrichment for the grid matched nothing. - Detail page AJAX submit looked up CSRF via a non-existent data attribute and dropped the note field entirely. - Endpoint used a hand-rolled CSRF check instead of Session::checkCsrfToken(). Fixes: - DomainSecurityLevelRepository: use RepositoryArrayHelper::unwrap(List), swap param order in listLevelsByDomainNos / listDetailsByDomainNos, centralize table name in a const. - security-level-data endpoint: canonical Session::checkCsrfToken(), unified JSON/PRG error path with proper HTTP status codes and flash. - Detail page: drop broken AJAX hijack, rely on native form POST + PRG (GR-CORE-012). - Grid list: refetch via gridRef.grid.forceRender() after dialog save instead of DOM-only mutation, so Grid.js internal state stays in sync. - Add dedicated Note column next to the badge with ellipsis + title tooltip. - Replace console.* in the dialog with showAsyncFlash for user-visible errors; add i18n keys (de/en) for all error messages. - Drop unused postAction import and TENANT_ID_OTHER test constant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -545,5 +545,11 @@
|
||||
"Low": "Low",
|
||||
"Normal": "Normal",
|
||||
"High": "High",
|
||||
"Critical": "Critical"
|
||||
"Critical": "Critical",
|
||||
"Save failed": "Save failed",
|
||||
"Invalid CSRF token": "Invalid CSRF token",
|
||||
"No tenant context": "No tenant context",
|
||||
"Missing domain number": "Missing domain number",
|
||||
"Invalid security level": "Invalid security level",
|
||||
"Failed to save security level": "Failed to save security level"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user