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

Add ability to disable plugin actions, events, and cron tasks

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0-b1
    • Component/s: Plugins, Staff Interface
    • Labels:
      None

      Description

      Plugins can define a number of things, including:

      • Actions (access to plugin pages)
      • Cron tasks (automation tasks run by the plugin)
      • Events (listeners the plugin can take action on)

      With the exception of cron tasks, those cannot be changed except through the plugin source. However, in some cases, it may be necessary to disable some of this functionality from occurring. For instance, the Support Manager has a Knowledgebase, and some users would like to disable the knowledgebase from appearing. The related actions could be disabled to accomplish that. This gives staff finer control over what plugins do out of the box.

      For this, we will need to update the core:

      1. Add a new button called "Settings" next to the "Disabled" button that appears when staff manage plugins
        • The styles should probably be updated to be more responsive as well by having the buttons wrap underneath the logo/description when the browser size is small
        • The "Settings" button will appear for all plugins
      2. Add a page for plugins to manage settings when clicking the "Settings" button
        • This page will probably need to be created using tabs
        • There would be three sections, "Actions", "Events", and "Automation"
        • Each tab would have a list of its corresponding actions/events/cron tasks, each with an option simply to Disable/Enable them. This can be a checkbox "Enabled" that is checked or unchecked
      3. The core must be updated to adhere to plugin actions/events/cron tasks being disabled
        • Disabled cron tasks are already supported
        • Actions/Events will need to be updated in the corresponding database table to add a new column for whether the record is enabled. This can be similar to the `plugins` table that does the same thing for the entire plugin
        • Any Events that are disabled should not be called on the plugin
        • Any actions that are disabled should not be accessible at the URI
          • This can probably be accomplished in AppController::preAction, similar to when the entire plugin is disabled
        • Whether individual actions/events/cron tasks are disabled, or the entire plugin is, the actions/events/cron tasks should be disabled

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Story Points 13
        tyson Tyson Phillips (Inactive) made changes -
        Description Plugins can define a number of things, including:
        * Actions (access to plugin pages)
        * Cron tasks (automation tasks run by the plugin)
        * Events (listeners the plugin can take action on)

        With the exception of cron tasks, those cannot be changed except through the plugin source. However, in some cases, it may be necessary to disable some of this things from occurring. For instance, the Support Manager has a Knowledgebase, and some users would like to disable the knowledgebase from appearing. The related actions could be disabled to accomplish that. This gives staff finer control over what plugins do out of the box.

        For this, we will need to update the core:
        # Add a new button called "Settings" next to the "Disabled" button that appears when staff manage plugins
        #* The styles should probably be updated to be more responsive as well by having the buttons wrap underneath the logo/description when the browser size is small
        #* The "Settings" button will appear for all plugins
        # Add a page for plugins to manage settings when clicking the "Settings" button
        #* This page will probably need to be created using tabs
        #* There would be three sections, "Actions", "Events", and "Automation"
        #* Each tab would have a list of its corresponding actions/events/cron tasks, each with an option simply to Disable/Enable them. This can be a checkbox "Enabled" that is checked or unchecked
        # The core must be updated to adhere to plugin actions/events/cron tasks being disabled
        #* Disabled cron tasks are already supported
        #* Actions/Events will need to be updated in the corresponding database table to add a new column for whether the record is enabled. This can be similar to the `plugins` table that does the same thing for the entire plugin
        #* Any Events that are disabled should not be called on the plugin
        #* Any actions that are disabled should not be accessible at the URI
        #** This can probably be accomplished in AppController::preAction, similar to when the entire plugin is disabled
        #* Whether individual actions/events/cron tasks are disabled, or the entire plugin is, the actions/events/cron tasks should be disabled
        Plugins can define a number of things, including:
        * Actions (access to plugin pages)
        * Cron tasks (automation tasks run by the plugin)
        * Events (listeners the plugin can take action on)

        With the exception of cron tasks, those cannot be changed except through the plugin source. However, in some cases, it may be necessary to disable some of this functionality from occurring. For instance, the Support Manager has a Knowledgebase, and some users would like to disable the knowledgebase from appearing. The related actions could be disabled to accomplish that. This gives staff finer control over what plugins do out of the box.

        For this, we will need to update the core:
        # Add a new button called "Settings" next to the "Disabled" button that appears when staff manage plugins
        #* The styles should probably be updated to be more responsive as well by having the buttons wrap underneath the logo/description when the browser size is small
        #* The "Settings" button will appear for all plugins
        # Add a page for plugins to manage settings when clicking the "Settings" button
        #* This page will probably need to be created using tabs
        #* There would be three sections, "Actions", "Events", and "Automation"
        #* Each tab would have a list of its corresponding actions/events/cron tasks, each with an option simply to Disable/Enable them. This can be a checkbox "Enabled" that is checked or unchecked
        # The core must be updated to adhere to plugin actions/events/cron tasks being disabled
        #* Disabled cron tasks are already supported
        #* Actions/Events will need to be updated in the corresponding database table to add a new column for whether the record is enabled. This can be similar to the `plugins` table that does the same thing for the entire plugin
        #* Any Events that are disabled should not be called on the plugin
        #* Any actions that are disabled should not be accessible at the URI
        #** This can probably be accomplished in AppController::preAction, similar to when the entire plugin is disabled
        #* Whether individual actions/events/cron tasks are disabled, or the entire plugin is, the actions/events/cron tasks should be disabled
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.9.0 Sprint 4 [ 102 ]
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Tyson Phillips [ tyson ]
        Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        tyson Tyson Phillips (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour, 51 minutes [ 6660 ]
        Worklog Id 13200 [ 13200 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 1 hour, 51 minutes [ 6660 ] 7 hours, 11 minutes [ 25860 ]
        Worklog Id 13213 [ 13213 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 7 hours, 11 minutes [ 25860 ] 1 day, 18 minutes [ 29880 ]
        Worklog Id 13217 [ 13217 ]
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.9.0 Sprint 4 [ 102 ] 4.9.0 Sprint 4, 4.9.0 Sprint 5 [ 102, 103 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 1 day, 18 minutes [ 29880 ] 1 day, 1 hour, 31 minutes [ 34260 ]
        Worklog Id 13218 [ 13218 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 1 day, 1 hour, 31 minutes [ 34260 ] 1 day, 5 hours, 6 minutes [ 47160 ]
        Worklog Id 13224 [ 13224 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 1 day, 5 hours, 6 minutes [ 47160 ] 2 days, 2 hours, 37 minutes [ 67020 ]
        Worklog Id 13231 [ 13231 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 2 days, 2 hours, 37 minutes [ 67020 ] 2 days, 7 hours, 8 minutes [ 83280 ]
        Worklog Id 13241 [ 13241 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 2 days, 7 hours, 8 minutes [ 83280 ] 3 days, 34 minutes [ 88440 ]
        Worklog Id 13245 [ 13245 ]
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #804 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 3 days, 34 minutes [ 88440 ] 3 days, 2 hours, 54 minutes [ 96840 ]
        Worklog Id 13246 [ 13246 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 3 days, 2 hours, 54 minutes [ 96840 ] 3 days, 7 hours, 24 minutes [ 113040 ]
        Worklog Id 13250 [ 13250 ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #804 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              31/Mar/20

              Time Tracking

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

                Agile