Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3624

Add permissions before calling the upgrade() method in Plugin Manager

    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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            abdy Abdy Franco
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              26/May/20

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 4 hours, 30 minutes
              4h 30m

                Agile