ocis icon indicating copy to clipboard operation
ocis copied to clipboard

isolated app configuration

Open fschade opened this issue 1 year ago • 1 comments

Description

Introduce a new feature which allows configuring applications individually instead of using the global apps.yaml file. With that, each application can have its own configuration file, which will be loaded by the WEB service.

The local configuration has the highest priority and will override the global configuration. The Following order of precedence is used: local.config > global.config > manifest.config.

Besides the configuration, the application now be disabled by setting the disabled field to true in one of the configuration files.

APP/manifest.json

{
  "entrypoint": "index.js",
  "config": {
    "from_manifest": 1,
    "bar": 1
  }
}

apps.yaml

bar:
  config:
    from_global: 1
    bar: 2

APP/config.json

{
  "config": {
    "from_local": 1,
    "bar": 3
  }
}

result https://XZY/config.json

{
  "external_apps": [
    {
      "id": "bar",
      "path": "/assets/apps/bar/index.js",
      "config": {
        "bar": 3,
        "from_global": 1,
        "from_local": 1,
        "from_manifest": 1
      }
    }
  ]
}

Related Issue

  • Fixes https://github.com/owncloud/ocis/issues/9687

Motivation and Context

Allow to configure application individually.

How Has This Been Tested?

  • unit tests

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Technical debt
  • [ ] Tests only (no source changes)

fschade avatar Jul 25 '24 14:07 fschade