// Token: 0x060019C7 RID: 6599 RVA: 0x0006CCE0 File Offset: 0x0006AEE0 internal static object RoleGroupTypeGetter(IPropertyBag propertyBag) { SecurityIdentifier right = (SecurityIdentifier)propertyBag[ADGroupSchema.ForeignGroupSid]; LinkedPartnerGroupInformation linkedPartnerGroupInformation = (LinkedPartnerGroupInformation)propertyBag[ADGroupSchema.LinkedPartnerGroupAndOrganizationId]; if (null != right) { return(RoleGroupType.Linked); } if (linkedPartnerGroupInformation != null) { return(RoleGroupType.PartnerLinked); } return(RoleGroupType.Standard); }
private static QueryFilter LinkedPartnerGroupFilterBuilder(LinkedPartnerGroupInformation id) { return(new ComparisonFilter(ComparisonOperator.Equal, ADGroupSchema.LinkedPartnerGroupAndOrganizationId, id)); }
private static Result <T> LinkedPartnerGroupHashLookup <T>(Hashtable hash, LinkedPartnerGroupInformation key) where T : ADRawEntry { return((Result <T>)(hash.ContainsKey(key) ? hash[key] : new Result <T>(default(T), ProviderError.NotFound))); }
private static bool IsPartnerManagedLinkedRoleGroup(ExSearchResultEntry searchEntry, EdgeSyncDiag diagSession, out Guid groupGuid) { groupGuid = Guid.Empty; if (!EhfCompanyAdmins.IsPartnerManagedGroup(searchEntry, diagSession)) { return(false); } DirectoryAttribute directoryAttribute; if (!searchEntry.Attributes.TryGetValue("msExchPartnerGroupID", out directoryAttribute)) { diagSession.LogAndTraceError("msExchPartnerGroupID attribute is not present in the partner managed group '{0}'", new object[] { searchEntry.DistinguishedName }); return(false); } if (directoryAttribute == null || directoryAttribute.Count == 0) { diagSession.LogAndTraceError("msExchPartnerGroupID attribute is not set on the partner managed group '{0}'", new object[] { searchEntry.DistinguishedName }); return(false); } string text = directoryAttribute[0] as string; if (string.IsNullOrEmpty(text)) { diagSession.LogAndTraceError("msExchPartnerGroupID attribute is empty for the partner managed group '{0}'", new object[] { searchEntry.DistinguishedName }); return(false); } LinkedPartnerGroupInformation linkedPartnerGroupInformation; try { linkedPartnerGroupInformation = LinkedPartnerGroupInformation.Parse(text); } catch (ArgumentException) { diagSession.LogAndTraceError("msExchPartnerGroupID attribute value '{0}' is not in the expected format for '{1}'", new object[] { text, searchEntry.DistinguishedName }); return(false); } if (string.IsNullOrEmpty(linkedPartnerGroupInformation.LinkedPartnerGroupId)) { diagSession.LogAndTraceError("msExchPartnerGroupID attribute value '{0}' has an empty LinkdedPartnetGroupId: '{1}'", new object[] { text, searchEntry.DistinguishedName }); return(false); } if (GuidHelper.TryParseGuid(linkedPartnerGroupInformation.LinkedPartnerGroupId, out groupGuid)) { return(true); } diagSession.LogAndTraceError("msExchPartnerGroupID attribute value '{0}' is not a valid Guid: '{1}'", new object[] { text, searchEntry.DistinguishedName }); return(false); }