Add so only controllers are left
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Umbraco.Cms.Core.Security
|
||||
char permissionToCheck) => CheckPermissions(content, user, new[] { permissionToCheck });
|
||||
|
||||
public ContentAccess CheckPermissions(
|
||||
IContent content,
|
||||
IContent? content,
|
||||
IUser? user,
|
||||
IReadOnlyList<char> permissionsToCheck)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Umbraco.Extensions
|
||||
/// <summary>
|
||||
/// Adds all required components to run the Umbraco back office
|
||||
/// </summary>
|
||||
public static IUmbracoBuilder AddBackOffice(this IUmbracoBuilder builder, Action<IMvcBuilder> configureMvc = null) => builder
|
||||
public static IUmbracoBuilder AddBackOffice(this IUmbracoBuilder builder, Action<IMvcBuilder>? configureMvc = null) => builder
|
||||
.AddConfiguration()
|
||||
.AddUmbracoCore()
|
||||
.AddWebComponents()
|
||||
@@ -77,7 +77,7 @@ namespace Umbraco.Extensions
|
||||
/// <summary>
|
||||
/// Gets the back office tree collection builder
|
||||
/// </summary>
|
||||
public static TreeCollectionBuilder Trees(this IUmbracoBuilder builder)
|
||||
public static TreeCollectionBuilder? Trees(this IUmbracoBuilder builder)
|
||||
=> builder.WithCollectionBuilder<TreeCollectionBuilder>();
|
||||
|
||||
public static IUmbracoBuilder AddBackOfficeCore(this IUmbracoBuilder builder)
|
||||
@@ -97,7 +97,7 @@ namespace Umbraco.Extensions
|
||||
// the collection builder only accepts types inheriting from TreeControllerBase
|
||||
// and will filter out those that are not attributed with TreeAttribute
|
||||
var umbracoApiControllerTypes = builder.TypeLoader.GetUmbracoApiControllers().ToList();
|
||||
builder.Trees()
|
||||
builder.Trees()?
|
||||
.AddTreeControllers(umbracoApiControllerTypes.Where(x => typeof(TreeControllerBase).IsAssignableFrom(x)));
|
||||
|
||||
builder.AddWebMappingProfiles();
|
||||
|
||||
Reference in New Issue
Block a user