-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
New feature: UI to list and remove orphaned ACL resources in backend. #3647
Conversation
Nice. Just did a visual review ... whats about disabled extensions? (thats why ive not completed commented code parts) |
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource/Grid.php
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource/Grid.php
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource/Grid.php
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource/Grid.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource/Grid.php
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/controllers/Permissions/OrphanedResourceController.php
Show resolved
Hide resolved
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.
Add strict types for new classes?
Co-authored-by: Sven Reichel <[email protected]>
Co-authored-by: Sven Reichel <[email protected]>
Co-authored-by: Sven Reichel <[email protected]>
…e/Grid.php Co-authored-by: Sven Reichel <[email protected]>
…e.php Co-authored-by: Sven Reichel <[email protected]>
I think a n98-magerun action or a shell script would be enough because it's a one time maintainance thing, but good job anyway! |
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource/Grid.php
Outdated
Show resolved
Hide resolved
@sreichel do you think that there are a lot of work with 💣 Edit: .... ~10 files to edit for backend! But, I didn't tested all pages. |
Good job, but it would appear in all my clients' dashboards who are not developers and wouldn't know what to do. Question: I haven't tested it yet, but what happens if I remove the permissions of a temporarily disabled extension? Will they be automatically recreated or will break the extension ? Unfortunately, there is no system for uninstalling extensions. There are other things to consider, such as cleaning up the core_resource and core_config tables, and rolling back any database changes. |
app/code/core/Mage/Adminhtml/controllers/Permissions/OrphanedResourceController.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/controllers/Permissions/OrphanedResourceController.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/Permissions/OrphanedResource/Grid.php
Outdated
Show resolved
Hide resolved
just some quick last minute formal fixes and I'll absolutely approve this |
…esourceController.php Co-authored-by: Fabrizio Balliano <[email protected]>
…e/Grid.php Co-authored-by: Fabrizio Balliano <[email protected]>
…e.php Co-authored-by: Fabrizio Balliano <[email protected]>
Delete unnecessary docblock
All the other links in the menu are limited to one word. If we rename the new link just "Resources", is it a bad idea? In my opinion no, because it covers everything related to resources. |
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.
I kinda prefer more verbose names expecially if they're more understandable :-)
another review and we're good to merge |
it would be so nice to have enough reviews for a new feature.. |
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.
It works as described. Good job @kiatng.
Description (*)
Orphaned ACL resources are left behind in the
admin_rule
table when modules are removed. This PR provides a UI to list these orphaned resources and delete them in backend > System > Permissions > Orphaned Resources.Related Pull Requests
See PR #2339 that log the orphaned resources.
See PR #3642 that revert #2339 to not cluttered exception.log.
Fixed Issues (if relevant)
Screenshots [edited]
At backend login:
Grid to list and delete: