Example #1
0
 static RecipientPermissionHelper()
 {
     foreach (FieldInfo fieldInfo in typeof(RecipientAccessRight).GetFields(BindingFlags.Static | BindingFlags.Public | BindingFlags.GetField))
     {
         RightGuidAttribute[] array = (RightGuidAttribute[])fieldInfo.GetCustomAttributes(typeof(RightGuidAttribute), false);
         RecipientAccessRight key   = (RecipientAccessRight)fieldInfo.GetValue(null);
         RecipientPermissionHelper.RecipientAccessRightGuidMap[key] = array[0].Guid;
     }
 }
Example #2
0
 internal static Guid GetRecipientAccessRightGuid(RecipientAccessRight right)
 {
     return(RecipientPermissionHelper.RecipientAccessRightGuidMap[right]);
 }
 public RecipientPermission(ActiveDirectoryAccessRule ace, ADObjectId identity, string trustee, RecipientAccessRight accessRight) : this()
 {
     if (ace == null)
     {
         throw new ArgumentNullException("ace");
     }
     this.Identity          = identity;
     this.Trustee           = trustee;
     this.AccessControlType = ace.AccessControlType;
     this.AccessRights      = new MultiValuedProperty <RecipientAccessRight>(accessRight);
     this.IsInherited       = ace.IsInherited;
     this.InheritanceType   = ace.InheritanceType;
 }