Beispiel #1
0
 public UnresolvedAclEntry(UnresolvedAclEntry copyFrom)
 {
     //Contract.Requires( copyFrom != null );
     this.SourceTarget  = copyFrom.SourceTarget;
     this.SubjectId     = copyFrom.SubjectId;
     this.PrivilegeId   = copyFrom.PrivilegeId;
     this.Order         = copyFrom.Order;
     this.Allow         = copyFrom.Allow;
     this.IsInherited   = copyFrom.IsInherited;
     this.ViaMembership = copyFrom.ViaMembership;
     this.ExplicitAllow = copyFrom.ExplicitAllow;
 }
 public AnnotatedAclEntry ResolveAclEntry(UnresolvedAclEntry e, SecurityTargetKind targetKind)
 {
     return(new AnnotatedAclEntry
     {
         Entry = new AclEntry
         {
             Privilege = Privileges.FirstOrDefault(p => p.SID == e.PrivilegeId),
             Subject = _memoizer.Memoize(new { e.SubjectId }, sid => SubjectProviders.Select(p => p.Find(sid.SubjectId)).FirstOrDefault(s => s != null)),
             Kind = e.Allow ? AclEntryKind.Allow : AclEntryKind.Deny
         },
         InheritedFrom = e.IsInherited ? ResolveTarget(e.SourceTarget, targetKind) : null
     });
 }