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

        abdy Abdy Franco created issue -
        abdy Abdy Franco made changes -
        Field Original Value New Value
        Rank Ranked higher
        abdy Abdy Franco made changes -
        Sprint 4.11.0 Sprint 2 [ 109 ]
        abdy Abdy Franco made changes -
        Rank Ranked lower
        abdy Abdy Franco made changes -
        Sprint 4.11.0 Sprint 2 [ 109 ]
        abdy Abdy Franco made changes -
        Rank Ranked higher
        abdy Abdy Franco made changes -
        Flagged Impediment [ 10000 ]
        abdy Abdy Franco made changes -
        Flagged Impediment [ 10000 ]
        abdy Abdy Franco made changes -
        Priority Critical [ 2 ] Major [ 3 ]
        abdy Abdy Franco made changes -
        Sprint 4.11.0 Sprint 2 [ 109 ]
        abdy Abdy Franco made changes -
        Rank Ranked lower
        abdy Abdy Franco made changes -
        Rank Ranked lower
        abdy Abdy Franco made changes -
        Rank Ranked higher
        Automated transition triggered when Abdy Franco created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        Automated transition triggered when Abdy Franco created pull request #886 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 2 hours, 50 minutes [ 10200 ]
        Worklog Id 13670 [ 13670 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 2 hours, 50 minutes [ 10200 ] 3 hours, 22 minutes [ 12120 ]
        Worklog Id 13671 [ 13671 ]
        Automated transition triggered when Jonathan Reissmueller merged pull request #886 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]
        abdy Abdy Franco made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        abdy Abdy Franco made changes -
        Time Spent 3 hours, 22 minutes [ 12120 ] 4 hours, 30 minutes [ 16200 ]
        Worklog Id 13674 [ 13674 ]
        Automated transition triggered when Jonathan Reissmueller made commit 6b54fefcf5f in Stash -
        Status Reopened [ 4 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          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