diff --git a/src/Umbraco.Core/Security/ContentPermissions.cs b/src/Umbraco.Core/Security/ContentPermissions.cs index c26e53252d..3574471813 100644 --- a/src/Umbraco.Core/Security/ContentPermissions.cs +++ b/src/Umbraco.Core/Security/ContentPermissions.cs @@ -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 permissionsToCheck) { diff --git a/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilderExtensions.cs b/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilderExtensions.cs index 63027a3c9e..640c0847b9 100644 --- a/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilderExtensions.cs +++ b/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilderExtensions.cs @@ -33,7 +33,7 @@ namespace Umbraco.Extensions /// /// Adds all required components to run the Umbraco back office /// - public static IUmbracoBuilder AddBackOffice(this IUmbracoBuilder builder, Action configureMvc = null) => builder + public static IUmbracoBuilder AddBackOffice(this IUmbracoBuilder builder, Action? configureMvc = null) => builder .AddConfiguration() .AddUmbracoCore() .AddWebComponents() @@ -77,7 +77,7 @@ namespace Umbraco.Extensions /// /// Gets the back office tree collection builder /// - public static TreeCollectionBuilder Trees(this IUmbracoBuilder builder) + public static TreeCollectionBuilder? Trees(this IUmbracoBuilder builder) => builder.WithCollectionBuilder(); 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();