FR display a theme while maintenance mode is active
Description
This pull request enables our users to utilize a theme while maintenance mode is active, whether it's the currently loaded theme or a different one.
Motivation and Context
I consider this feature a 'nice-to-have,' especially since a recent customer requested it. It ensures that the Web UI always displays branding when available.
I made a change to an 'if' statement in the Router.php file that I believed was unnecessary, but I still marked it as a 'Breaking change' because I'm not a PHP developer, and this file seemed significant to me.
How Has This Been Tested?
- Baremetal oC 10.13.1
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Database schema changes (next release will require increase of minor version instead of patch)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)
Checklist:
- [x] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised:
- [ ] Changelog item, see TEMPLATE
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.
Please create a changelog entry in https://github.com/owncloud/core/tree/master/changelog/unreleased, see previous examples and README in https://github.com/owncloud/core/tree/master/changelog
SonarCloud Quality Gate failed. 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
0.0% Coverage
0.0% Duplication
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
The theme is not enabled in maintenance mode by intention. Any theme (just like any other app) can cause issues during upgrade (which is the main purpose of the maintenance mode).
From my pov this would be an acceptable change to show the theme in maintenance mode if we are not upgrading.
My main complain is that I think the "load maintenance app" piece is misplaced.
If I call loadApps() and it returns false to signal a failure, why there are apps being loaded? What's the meaning of returning false then?
It gets more confusing if I want to load the authentication apps and what I get is that just a theming app is loaded, which is something I didn't requested.
In addition, placing the check within the loadApps method will affect the webdav and ocs endpoints among others. Do we need to load the theme in those cases? I don't think so.
In general, the performance drop caused by loading the theme will be meaningless. However, we don't have control over what the app is doing, so the worst case would be that the app takes a lot of time loading (maybe with a legit reason). If there is no reason for the webdav endpoint (and maybe others) to load the maintenance theme, let's avoid that.
