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
      There are no Sub-Tasks for this issue.

        Activity

        There are no comments yet on this issue.

          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