// Token: 0x0600013B RID: 315 RVA: 0x00007F98 File Offset: 0x00006198 internal Dictionary <Guid, AdTagData> GetAllTags(IExchangePrincipal mailboxOwner) { this.LoadCache <Dictionary <Guid, AdTagData> >(mailboxOwner, "TagsCache", this.allTags, this.orgsToRefreshForTags, this.tagLock, InfoWorkerEventLogConstants.Tuple_CorruptionInADElcTags, delegate { Dictionary <Guid, AdTagData> value = new Dictionary <Guid, AdTagData>(); AdTagReader.LoadTagsInOrg(mailboxOwner.MailboxInfo.OrganizationId, value); this.allTags[mailboxOwner.MailboxInfo.OrganizationId] = value; }); return(this.allTags[mailboxOwner.MailboxInfo.OrganizationId]); }
protected override void InternalValidate() { base.InternalValidate(); if (this.IsDefaultAutoGroupPolicyTag && this.IsDefaultModeratedRecipientsPolicyTag) { base.WriteError(new ArgumentException(Strings.ErrorMultipleDefaultRetentionPolicyTag), ErrorCategory.InvalidArgument, this.DataObject.Identity); } if (this.IsDefaultAutoGroupPolicyTag) { this.DataObject.IsDefaultAutoGroupPolicyTag = true; this.existingDefaultPolicyTags = ApprovalUtils.GetDefaultRetentionPolicyTag((IConfigurationSession)base.DataSession, ApprovalApplicationId.AutoGroup, int.MaxValue); } else if (this.IsDefaultModeratedRecipientsPolicyTag) { this.DataObject.IsDefaultModeratedRecipientsPolicyTag = true; this.existingDefaultPolicyTags = ApprovalUtils.GetDefaultRetentionPolicyTag((IConfigurationSession)base.DataSession, ApprovalApplicationId.ModeratedRecipient, int.MaxValue); } if (base.ParameterSetName == "UpgradeManagedFolder" && this.ElcFolderToUpgrade == null) { return; } if (Datacenter.IsMicrosoftHostedOnly(false)) { List <RetentionPolicyTag> allRetentionTags = AdTagReader.GetAllRetentionTags(this.ConfigurationSession, base.OrganizationId); if (allRetentionTags.Count >= 500) { base.WriteError(new RetentionPolicyTagTaskException(Strings.ErrorTenantRetentionTagLimitReached(500)), ErrorCategory.InvalidOperation, this.DataObject); } } if (this.DataObject.Type == ElcFolderType.RecoverableItems && !this.contentSettingsObject.RetentionAction.Equals(RetentionActionType.MoveToArchive)) { base.WriteError(new ArgumentException(Strings.ErrorDumpsterTagWrongRetentionAction), ErrorCategory.InvalidArgument, this); } if (this.DataObject.Type != ElcFolderType.All && !this.contentSettingsObject.MessageClass.Equals(ElcMessageClass.AllMailboxContent)) { base.WriteError(new RetentionPolicyTagTaskException(Strings.ErrorOnlyDefaultTagAllowCustomizedMessageClass), ErrorCategory.InvalidOperation, this.DataObject); } string tagName; if (this.DataObject.RetentionId != Guid.Empty && !(base.DataSession as IConfigurationSession).CheckForRetentionTagWithConflictingRetentionId(this.DataObject.RetentionId, out tagName)) { base.WriteError(new RetentionPolicyTagTaskException(Strings.ErrorRetentionIdConflictsWithRetentionTag(this.DataObject.RetentionId.ToString(), tagName)), ErrorCategory.InvalidOperation, this.DataObject); } ValidationError[] array = this.contentSettingsObject.Validate(); if (array.Length > 0) { for (int i = 0; i < array.Length; i++) { this.WriteError(new DataValidationException(array[i]), (ErrorCategory)1003, this.contentSettingsObject.Identity, array.Length - 1 == i); } } }
// Token: 0x06000422 RID: 1058 RVA: 0x0001D778 File Offset: 0x0001B978 private bool GetAdData() { this.tagsInUserPolicy = AdTagReader.GetTagsInPolicy(base.MailboxSession, base.ADUser, this.allAdTags); if (this.tagsInUserPolicy == null) { ElcUserInformation.Tracer.TraceDebug <ElcUserTagInformation>((long)this.GetHashCode(), "{0}: User has no associated elc policy in the AD.", this); return(false); } if (this.tagsInUserPolicy != null && this.tagsInUserPolicy.Count > 0) { ElcUserInformation.Tracer.TraceDebug <ElcUserTagInformation, int>((long)this.GetHashCode(), "{0}: User has {1} elc tags in the AD.", this, this.tagsInUserPolicy.Count); } else { ElcUserInformation.Tracer.TraceDebug <ElcUserTagInformation>((long)this.GetHashCode(), "{0}: User has no elc tags.", this); } return(true); }
internal static StoreTagData ResolveTag(IConfigurationSession session, RetentionPolicyTagIdParameter tagId) { RetentionPolicyTag retentionPolicyTag = null; IEnumerable <RetentionPolicyTag> objects = tagId.GetObjects <RetentionPolicyTag>(null, session); if (objects != null) { foreach (RetentionPolicyTag retentionPolicyTag2 in objects) { if (retentionPolicyTag != null) { throw new ManagementObjectAmbiguousException(Strings.ErrorAmbiguousRetentionPolicyTagId(tagId.ToString())); } retentionPolicyTag = retentionPolicyTag2; } } if (retentionPolicyTag == null) { throw new ManagementObjectNotFoundException(Strings.ErrorRetentionTagNotFound(tagId.ToString())); } AdTagData adTagData = AdTagReader.FetchTagContentSettings(retentionPolicyTag); return(new StoreTagData(adTagData)); }