-
Notifications
You must be signed in to change notification settings - Fork 25
feat: add acl constraints #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add acl constraints #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements ACL (Access Control List) constraints for the Migration Assistant feature, replacing generic 'admin' permissions with granular role-based access control.
Key changes:
- Introduced a comprehensive ACL system with four roles: viewer, editor, creator, and deleter
- Updated all API route permissions from 'admin' to specific migration permissions
- Added permission checks in UI components to disable actions based on user roles
Reviewed Changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Resources/app/administration/src/module/swag-migration/acl/index.ts | Defines ACL structure with viewer, editor, creator, and deleter roles |
| src/Resources/app/administration/src/module/swag-migration/index.ts | Updates route privileges and imports ACL configuration |
| src/Controller/StatusController.php | Replaces 'admin' ACL with migration-specific permissions |
| src/Controller/PremappingController.php | Updates premapping endpoints to require editor permission |
| src/Controller/HistoryController.php | Updates history endpoints with appropriate migration permissions |
| src/Controller/DataProviderController.php | Updates data provider endpoints with viewer/editor permissions |
| src/Resources/app/administration/src/module/swag-migration/store/migration.store.ts | Adds ACL checks to store actions |
| src/Resources/app/administration/src/module/swag-migration/snippet/en-GB.json | Adds permission-related translation strings |
| src/Resources/app/administration/src/module/swag-migration/snippet/de-DE.json | Adds German translations for permissions |
| src/Resources/app/administration/src/module/swag-migration/page/swag-migration-process-screen/index.ts | Injects ACL service and adds permission check |
| src/Resources/app/administration/src/module/swag-migration/page/swag-migration-index/index.ts | Injects ACL service |
| src/Resources/app/administration/src/module/swag-migration/page/swag-migration-history/index.ts | Injects ACL service |
| src/Resources/app/administration/src/module/swag-migration/component/card/swag-migration-shop-information/index.ts | Injects ACL service |
| src/Resources/app/administration/src/module/swag-migration/extension/sw-dashboard-index/index.ts | Replaces isAdmin check with viewer permission |
| tests/Jest/package.json | Reorganizes dependencies alphabetically and adds TypeScript |
| src/Resources/app/administration/package.json | Reorganizes dependencies and adds meteor-tokens |
Files not reviewed (2)
- tests/Jest/package-lock.json: Language not supported
- tests/acceptance/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ion/component/card/swag-migration-shop-information/swag-migration-shop-information.html.twig
Outdated
Show resolved
Hide resolved
cd9b013 to
a6eb3da
Compare
a6eb3da to
0bcc699
Compare
MalteJanz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had a rough first look 🙂
src/Resources/app/administration/src/module/swag-migration/acl/index.ts
Outdated
Show resolved
Hide resolved
107db7f to
ae86cfa
Compare
ae86cfa to
2287d30
Compare
…or' into feat/add-acl-constrains
7ce1a74
into
feature/migration-logging-refactor
fixes #13017
Introduced ACL migration roles (viewer, editor, creator, deleter) to make migration access configurable. Previously, access to any migration UI or API route was restricted and available only to admin users.