/// <summary> /// Allows editing. /// </summary> /// <returns><c>true</c> if editing is allowed, <c>false</c> otherwise.</returns> private bool AllowEditable() { PropertyData innerProperty = this.InnerProperty; PropertyContext currentContext = this.CurrentContext; if (innerProperty == null || innerProperty.IsDynamicProperty || currentContext == null) { return(false); } ISecurable securable = currentContext.PropertyContainer as ISecurable ?? currentContext.CurrentContent as ISecurable; bool flag = this.CurrentContent != null && this.CurrentContent.ContentLink.CompareToIgnoreWorkID( currentContext.CurrentContent.ContentLink) && currentContext.IsEditable() && !this.IsContainedInTemplate() && (securable == null || securable.GetSecurityDescriptor() .HasAccess(PrincipalInfo.CurrentPrincipal, AccessLevel.Edit)); return(flag); }