Skip to content

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

Merged
mhcwebdesign merged 1 commit intoopencart:3.0.x.xfrom
mhcwebdesign:3.0.x.x
Jan 26, 2024
Merged

extensions uninstall fixes: remove permissions, + fixes for phpstan.neon#13602
mhcwebdesign merged 1 commit intoopencart:3.0.x.xfrom
mhcwebdesign:3.0.x.x

Conversation

@mhcwebdesign
Copy link
Copy Markdown
Contributor

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
anykeyist pushed a commit to ocmod-space/opencart-3 that referenced this pull request Feb 1, 2024
@anykeyist
Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

mhcwebdesign commented Feb 2, 2024

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

@anykeyist
Copy link
Copy Markdown

anykeyist 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