|
If an application is being depended on, we should not allow it to be disabled, unless the applications which depend on it are also being disabled.
Scope:
- Return an error indicating that the application cannot be disabled because other applications enabled for your tenant depend on it. This error message should include a list of those applications
- Ideally not just those which directly depend on the application being disabled, but also those which indirectly depend on it.
NOTE: Could mean traversing the tree of application dependencies from the target node (application) out to the leaves
NOTE: May require schema changes and API spec updates
NOTE: Support for a ""cascade"" parameter is an interesting idea. When cascade=true, the application(s) specified would be disabled for the tenant along with those which depend on it. This is potentially dangerous, but also very convenient/powerful. For now, let's keep this out of scope, but it's something to think about as a potential future enhancement.
DEV NOTES:
- This story relates to the hierarchical installation/hierarchical uninstallation
- Should be done after this US1129694
Example
Given:
- app-foo depends on app-foo-core
- app-foo-core depends on app-bar and app-baz.
Then:
- trying to disable [ app-foo ] would result in an error indicating that [ app-foo-core, app-bar, app-baz ] would also need to be disabled.
- trying to disable [ app-foo-core ] would result in an error indicating that [ app-bar, app-baz ] would also need to be disabled.
- trying to disable [ app-foo, app-foo-core, app-bar ] would result in an error indicating that [ app-baz ] would also need to be disabled.
- trying to disable [ app-bar] would succeed since nothing depends on app-bar
- trying to disable [ app-baz] would succeed since nothing depends on app-baz
- trying to disable [ app-foo, app-foo-core, app-bar, app-baz ] would succeed because all dependencies would still be satisfied after these applications are disabled.
|