It builds!

This commit is contained in:
Shannon
2020-10-23 14:18:53 +11:00
parent 1400a02798
commit 64d8b56eca
80 changed files with 601 additions and 2356 deletions

View File

@@ -19,6 +19,7 @@ using Umbraco.Web.BackOffice.Profiling;
using Umbraco.Web.BackOffice.PropertyEditors;
using Umbraco.Web.BackOffice.Routing;
using Umbraco.Web.Common.Attributes;
using Umbraco.Web.Common.Security;
using Umbraco.Web.Editors;
using Umbraco.Web.Features;
using Umbraco.Web.Models.ContentEditing;
@@ -44,7 +45,7 @@ namespace Umbraco.Web.BackOffice.Controllers
private readonly RuntimeSettings _runtimeSettings;
private readonly SecuritySettings _securitySettings;
private readonly IRuntimeMinifier _runtimeMinifier;
private readonly IAuthenticationSchemeProvider _authenticationSchemeProvider;
private readonly IBackOfficeExternalLoginProviders _externalLogins;
private readonly IImageUrlGenerator _imageUrlGenerator;
private readonly PreviewRoutes _previewRoutes;
@@ -61,7 +62,7 @@ namespace Umbraco.Web.BackOffice.Controllers
IOptions<RuntimeSettings> runtimeSettings,
IOptions<SecuritySettings> securitySettings,
IRuntimeMinifier runtimeMinifier,
IAuthenticationSchemeProvider authenticationSchemeProvider,
IBackOfficeExternalLoginProviders externalLogins,
IImageUrlGenerator imageUrlGenerator,
PreviewRoutes previewRoutes)
{
@@ -77,7 +78,7 @@ namespace Umbraco.Web.BackOffice.Controllers
_runtimeSettings = runtimeSettings.Value;
_securitySettings = securitySettings.Value;
_runtimeMinifier = runtimeMinifier;
_authenticationSchemeProvider = authenticationSchemeProvider;
_externalLogins = externalLogins;
_imageUrlGenerator = imageUrlGenerator;
_previewRoutes = previewRoutes;
}
@@ -419,19 +420,11 @@ namespace Umbraco.Web.BackOffice.Controllers
"externalLogins", new Dictionary<string, object>
{
{
"providers", (await _authenticationSchemeProvider.GetAllSchemesAsync())
// Filter only external providers
.Where(x => !x.DisplayName.IsNullOrWhiteSpace())
// TODO: We need to filter only back office enabled schemes.
// Before we used to have a property bag to check, now we don't so need to investigate the easiest/best
// way to do this. We have the type so maybe we check for a marker interface, but maybe there's another way,
// just need to investigate.
//.Where(p => p.Properties.ContainsKey("UmbracoBackOffice"))
"providers", _externalLogins.GetBackOfficeProviders()
.Select(p => new
{
authType = p.Name, caption = p.DisplayName,
// TODO: See above, if we need this property bag in the vars then we'll need to figure something out
// properties = p.Properties
authType = p.AuthenticationType, caption = p.Name,
properties = p.Properties
})
.ToArray()
}