Example #1
0
 /// <summary>Build ACL from the given two Strings.</summary>
 /// <remarks>
 /// Build ACL from the given two Strings.
 /// The Strings contain comma separated values.
 /// </remarks>
 /// <param name="aclString">build ACL from array of Strings</param>
 private void BuildACL(string[] userGroupStrings)
 {
     users  = new HashSet <string>();
     groups = new HashSet <string>();
     foreach (string aclPart in userGroupStrings)
     {
         if (aclPart != null && IsWildCardACLValue(aclPart))
         {
             allAllowed = true;
             break;
         }
     }
     if (!allAllowed)
     {
         if (userGroupStrings.Length >= 1 && userGroupStrings[0] != null)
         {
             users = StringUtils.GetTrimmedStringCollection(userGroupStrings[0]);
         }
         if (userGroupStrings.Length == 2 && userGroupStrings[1] != null)
         {
             groups = StringUtils.GetTrimmedStringCollection(userGroupStrings[1]);
             groupsMapping.CacheGroupsAdd(new List <string>(groups));
         }
     }
 }