Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit endpoints returning the Login and BackOffice logos and background #17696

Merged

Conversation

bergmania
Copy link
Member

@bergmania bergmania commented Dec 2, 2024

Description

Fixes #16636
Fixes #17441

Introduces four new endpoints that are not exposed in management api, as they are only for backoffice.

  • /umbraco/management/api/v1/security/back-office/graphics/login-background
  • /umbraco/management/api/v1/security/back-office/graphics/logo
  • /umbraco/management/api/v1/security/back-office/graphics/login-logo
  • /umbraco/management/api/v1/security/back-office/graphics/login-logo-alternative

Updated usages of the ContentSettings.* to use these new endpoints and updated the hardcoded paths to point to these new endpoints.

Updated the backoffice-logo element to use the new logo endpoint including added a new setting for the path.

Added mock handlers for the new endpoints in both UI projects (Backoffice and Login).

Cleaned up (now-)unused assets so that image assets are placed in src/Umbraco.CMS.StaticAssets/wwwroot/umbraco/assets resembling what we had with the old backoffice. These new endpoints enable us to be able to replace all assets in one place.

Tests

bergmania and others added 2 commits December 2, 2024 14:17
…ng the configuration. Thereby some hardcoded values have been changed, but the url will now be the same every time.
Copy link
Contributor

@Migaroez Migaroez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed not possible to use Url.Action() to find the correct route, most likely because we overwrite the controller route part and the url helper doesn't take this into account?

I moved the concatenation into an explicit const so it can be referenced directly from the view instead of having to duplicate the concatenation.

Feel free to merge if you are happy with the change when the tests complete.

Copy link
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. We need to add the server URL, introduce a mock endpoint, and remove the old static assets in the client.

Copy link
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created a new "logo" endpoint with the logomark logo used in the backoffice and other places and consequently updated the backoffice-logo element to use the new logo endpoint including added a new setting for the path. NoNodes is also updated as well as the "disabled javascript" warnings.

Added mock handlers for the new endpoints in both UI projects (Backoffice and Login).

Cleaned up (now-)unused assets so that image assets are placed in src/Umbraco.CMS.StaticAssets/wwwroot/umbraco/assets resembling what we had with the old backoffice. These new endpoints enable us to be able to replace all assets in one place.

@iOvergaard iOvergaard changed the title Explicit endpoints returning the login static assets Explicit endpoints returning the Login and BackOffice logos and background Dec 5, 2024
@bergmania bergmania merged commit 88f9726 into v15/dev Dec 5, 2024
28 of 29 checks passed
@bergmania bergmania deleted the v15/bugfix/allow-changing-background-on-login-everywhere branch December 5, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants