Fixed issues with confusion about when to use umbracoPath and when to use the const.

Now it is possible to change the location of backoffice.
{
  "Umbraco": {
    "CMS": {
      "Global": {
       "UmbracoPath": "~/my-secret-loginpanel",
        "IconsPath": "~/my-secret-loginpanel/assets/icons"
      }
    }
  }
}
This commit is contained in:
Bjarke Berg
2021-09-01 07:50:17 +02:00
parent 9bb6d8b20b
commit 5953c9ebe7
3 changed files with 6 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
// force authentication to occur since this is not an authorized endpoint
var result = await this.AuthenticateBackOfficeAsync();
var viewPath = Path.Combine(_globalSettings.UmbracoPath , Constants.Web.Mvc.BackOfficeArea, nameof(Default) + ".cshtml")
var viewPath = Path.Combine(Constants.SystemDirectories.Umbraco, Constants.Web.Mvc.BackOfficeArea, nameof(Default) + ".cshtml")
.Replace("\\", "/"); // convert to forward slashes since it's a virtual path
return await RenderDefaultOrProcessExternalLoginAsync(
@@ -204,7 +204,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
// force authentication to occur since this is not an authorized endpoint
var result = await this.AuthenticateBackOfficeAsync();
var viewPath = Path.Combine(_globalSettings.UmbracoPath, Constants.Web.Mvc.BackOfficeArea, nameof(AuthorizeUpgrade) + ".cshtml");
var viewPath = Path.Combine(Constants.SystemDirectories.Umbraco, Constants.Web.Mvc.BackOfficeArea, nameof(AuthorizeUpgrade) + ".cshtml");
return await RenderDefaultOrProcessExternalLoginAsync(
result,