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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user