Uploaded image for project: 'App Framework'
  1. App Framework
  2. AF-31

App Framework should support use of an external configuration file for enabling/disabling apps

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.1
    • Labels:
    • Complexity:
      Undetermined

      Description

      Currently, the app framework supports a database-managed mechanism for enabling/disabling apps, as well as the use of permissions, which are also managed in the database.

      It would be useful to be able to configure the enabled apps and extensions via an external configuration file as well.

      Some intended usages:

      • a situation where mysql replication is backing a database for a reporting server, and a different set of apps and extensions need to be enabled on that server
      • an implementation using a standardized OpenMRS distribution, but wanting to disable a particular app or feature, without writing code
        • Note that this differs from the already-implemented idea of a "feature toggle", which is intended to switch off a feature as it is being developed, and should be removed once the feature is complete.

      To do:

      • Change the methods that currently return enabled Apps and enabled Extensions and/or determines whether a particular app or extension to also look at the file .OpenMRS/appframework-configuration.json
      • If the file does not exist, then the existing behavior should not be changed (i.e. check whether the app/extension is enabled, and the user has the required privilege)
      • The structure of the file should be:
        {
            "appsEnabledByDefault": true/false,
            "appConfiguration": {
                "id_of_app": {
                    "enabled": true/false
                    // eventually we can support overriding appConfig here
                }
            },
            "extensionConfiguration": {
                "id_of_extension": {
                    "enabled": true/false
                }
            }
        }
        
      • Reload this file when the module's context is refreshed. Use Jackson to load this into a proper Java object that defines its syntax.
      • Bonus: Reload this file if it has been modified (but avoid actually checking for modification every time we look or enabled apps/extensions)

        Attachments

          Activity

            People

            Assignee:
            mogoodrich Mark Goodrich
            Reporter:
            mseaton Mike Seaton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified