internal GrouperDocumentMember(DeserializedMember deserializedMember, GroupMemberTypes memberType)
 {
     Source     = (GroupMemberSources)Enum.Parse(typeof(GroupMemberSources), deserializedMember.Source, true);
     Action     = (GroupMemberActions)Enum.Parse(typeof(GroupMemberActions), deserializedMember.Action, true);
     MemberType = memberType;
     _rules     = deserializedMember.Rules.Select(r => new GrouperDocumentRule(r)).ToList();
 }
Beispiel #2
0
 public void Validate(DeserializedDocument deserializedDocument, DeserializedMember deserializedMember, List <ValidationError> validationErrors)
 {
     foreach (DeserializedRule rule in deserializedMember.Rules)
     {
         if (rule.Name.IEquals("Group"))
         {
             if (rule.Value.IEquals(deserializedDocument.GroupId))
             {
                 validationErrors.Add(new ValidationError(nameof(rule.Value), ResourceString.ValidationErrorSourceGroupSameAsTarget));
             }
         }
     }
 }
Beispiel #3
0
 public void Validate(DeserializedDocument deserializedDocument, DeserializedMember deserializedMember, List <ValidationError> validationErrors)
 {
     foreach (DeserializedRule rule in deserializedMember.Rules)
     {
         if (rule.Name.IEquals("Upn"))
         {
             if (!IsUpnValid(rule.Value))
             {
                 validationErrors.Add(new ValidationError(nameof(rule.Value), ResourceString.ValidationErrorInvalidUpn, rule.Value));
             }
         }
     }
 }