Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.10.0
-
Component/s: None
-
Labels:None
Description
In CORE-2567 the Plugin::getPermissions() method was added to manage the permissions and permission groups for plugins.
The PluginManager model was modified to manage the permissions during install and upgrade, however the permissions at the time of an upgrade are added after calling the upgrade() method of the plugin, which can cause that when trying to add an ACL during the upgrade() execution it will fail silently due to the lack of the necessary permissions.
A possible solution to this problem is to call the upgrade() method after adding the permissions inside a transaction, that way if the upgrade() execution fails, it will be possible to perform a rollback.