From 244d441dd45fc03ba5001e71dce0fb1904854da5 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 12 Aug 2020 12:04:19 +0100 Subject: [PATCH] Remove the if security check if access to settings section - seems we do not need to do this We check on the content node itself in the info tab for access to the doctype & template based on the section rather than the null presence of this property --- src/Umbraco.Web/Models/Mapping/CommonMapper.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web/Models/Mapping/CommonMapper.cs b/src/Umbraco.Web/Models/Mapping/CommonMapper.cs index 1276a2a405..f7db17ff74 100644 --- a/src/Umbraco.Web/Models/Mapping/CommonMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/CommonMapper.cs @@ -49,18 +49,9 @@ namespace Umbraco.Web.Models.Mapping public ContentTypeBasic GetContentType(IContentBase source, MapperContext context) { - // TODO: We can resolve the UmbracoContext from the IValueResolver options! - // OMG - if (HttpContext.Current != null && Composing.Current.UmbracoContext != null && Composing.Current.UmbracoContext.Security.CurrentUser != null - && Composing.Current.UmbracoContext.Security.CurrentUser.AllowedSections.Any(x => x.Equals(Constants.Applications.Settings))) - { - var contentType = _contentTypeBaseServiceProvider.GetContentTypeOf(source); - var contentTypeBasic = context.Map(contentType); - - return contentTypeBasic; - } - //no access - return null; + var contentType = _contentTypeBaseServiceProvider.GetContentTypeOf(source); + var contentTypeBasic = context.Map(contentType); + return contentTypeBasic; } public string GetTreeNodeUrl(IContentBase source)