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
This commit is contained in:
Warren Buckley
2020-08-12 12:04:19 +01:00
parent f7e0303a6f
commit 244d441dd4

View File

@@ -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<IContentTypeComposition, ContentTypeBasic>(contentType);
return contentTypeBasic;
}
//no access
return null;
var contentType = _contentTypeBaseServiceProvider.GetContentTypeOf(source);
var contentTypeBasic = context.Map<IContentTypeComposition, ContentTypeBasic>(contentType);
return contentTypeBasic;
}
public string GetTreeNodeUrl<TController>(IContentBase source)