Beispiel #1
0
        protected override void ProcessItem(Item item)
        {
            AccessRight accessRight;

            WriteObject(this.TryParseAccessRight(AccessRight, out accessRight) &&
                        AuthorizationManager.IsAllowed(item, accessRight, Identity));
        }
 private static bool CanUserWrite(Item item, Field field, User user)
 {
     if (AuthorizationManager.GetAccess(field, user, AccessRight.FieldWrite).Permission == AccessPermission.Deny)
     {
         return(false);
     }
     if (field.ID == FieldIDs.Security || field.ID == FieldIDs.InheritSecurity)
     {
         return(item.Access.CanAdmin());
     }
     return(item.Access.CanWrite());
 }