From b4974b93efd0319e469dd2488576858afc69d1cd Mon Sep 17 00:00:00 2001 From: olli Date: Sun, 28 Dec 2025 09:49:18 +0100 Subject: [PATCH] feat: integrate ApiPlatformBundle and enhance settings access control - Added ApiPlatformBundle to the project configuration. - Updated SettingsController to use custom access control for viewing and managing settings. - Modified AppFixtures to reflect new module structure and permissions for project management. - Adjusted ProjectStatus and ProjectTask entities to align with new permission checks. - Enhanced User entity to include a method for retrieving module permissions. - Implemented CleanupModulesCommand to deactivate or remove unimplemented modules. - Added CSRF protection configuration for forms. - Introduced property_info configuration for enhanced property handling. - Updated base template to include user module permissions in the frontend. - Created test_permissions.php for testing user permissions and roles. --- .gitignore | 1 + assets/js/layout/AppMenu.vue | 107 +- assets/js/layout/AppMenuItem.vue | 30 +- assets/js/views/ProjectManagement.vue | 4 +- composer.json | 67 +- composer.lock | 2617 ++++++++----------------- config/bundles.php | 2 +- config/packages/csrf.yaml | 11 + config/packages/property_info.yaml | 3 + src/Command/CleanupModulesCommand.php | 94 + src/Controller/SettingsController.php | 5 +- src/DataFixtures/AppFixtures.php | 102 +- src/Entity/ProjectStatus.php | 7 +- src/Entity/ProjectTask.php | 2 +- src/Entity/User.php | 48 +- symfony.lock | 37 +- templates/base.html.twig | 3 +- test_permissions.php | 78 + 18 files changed, 1325 insertions(+), 1893 deletions(-) create mode 100644 config/packages/csrf.yaml create mode 100644 config/packages/property_info.yaml create mode 100644 src/Command/CleanupModulesCommand.php create mode 100644 test_permissions.php diff --git a/.gitignore b/.gitignore index f62dea1..4a4c28c 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ npm-debug.log yarn-error.log ###< symfony/webpack-encore-bundle ### auth.json +config/routes/billing.yaml diff --git a/assets/js/layout/AppMenu.vue b/assets/js/layout/AppMenu.vue index ad67c5f..215d037 100644 --- a/assets/js/layout/AppMenu.vue +++ b/assets/js/layout/AppMenu.vue @@ -1,35 +1,78 @@ diff --git a/assets/js/layout/AppMenuItem.vue b/assets/js/layout/AppMenuItem.vue index 65ae9a0..d43ceb5 100644 --- a/assets/js/layout/AppMenuItem.vue +++ b/assets/js/layout/AppMenuItem.vue @@ -1,6 +1,6 @@