core icon indicating copy to clipboard operation
core copied to clipboard

FR display a theme while maintenance mode is active

Open steelcuts opened this issue 2 years ago • 6 comments

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

steelcuts avatar Sep 22 '23 15:09 steelcuts

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.

update-docs[bot] avatar Sep 22 '23 15:09 update-docs[bot]

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

IljaN avatar Sep 22 '23 16:09 IljaN

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

sonarqubecloud[bot] avatar Sep 22 '23 16:09 sonarqubecloud[bot]

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.

DeepDiver1975 avatar Oct 02 '23 07:10 DeepDiver1975

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.

jvillafanez avatar Mar 08 '24 14:03 jvillafanez

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 53%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Mar 11 '24 14:03 sonarqubecloud[bot]