Skip to content
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

extensions uninstall fixes: remove permissions, + fixes for phpstan.neon #13602

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

mhcwebdesign
Copy link
Collaborator

When an extension gets uninstalled, the access/modify permissions are now removed from the oc_user_group DB table, too.

When an extension gets uninstalled, the access/modify permissions are now removed from the oc_user_group DB table, too.
@mhcwebdesign mhcwebdesign merged commit b30bf19 into opencart:3.0.x.x Jan 26, 2024
6 checks passed
andr11b pushed a commit to ocmod-space/opencart-3 that referenced this pull request Feb 1, 2024
@andr11b
Copy link

andr11b commented Feb 1, 2024

upload/admin/model/user/user_group.php Line 86:

function removePermissions( string $route ): void {

shoud be

public function removePermissions( string $route ): void {

@mhcwebdesign
Copy link
Collaborator Author

mhcwebdesign commented Feb 2, 2024

You are right, thanks for spotting it. Now fixed.

@andr11b
Copy link

andr11b commented Feb 15, 2024

@mhcwebdesign, are you sure we need to remove permissions when installing the extension? Because now $this->model_user_user_group->removePermissions() called from install(), so it will remove permissions added by the extension itself. Because, for example, in my extensions, I add a permissions in the extensions, so that after installation I don't have to set them manually...
So, i'm sure we have to call $this->model_user_user_group->removePermissions() from uninstall().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants