protected override void InternalValidate() { TaskLogger.LogEnter(); base.InternalValidate(); if (base.IsInherited) { return; } if (this.Owner != null) { this.owner = SecurityPrincipalIdParameter.GetUserSid(base.TenantGlobalCatalogSession, this.Owner, new Task.TaskErrorLoggingDelegate(base.WriteError), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose)); } if (base.ParameterSetName == "Instance" || base.ParameterSetName == "AccessRights") { if (!base.ToGrantFullAccess() && this.AutoMapping != null && this.AutoMapping.Value) { base.WriteError(new InvalidOperationException(Strings.ErrorSpecifyAutoMappingOnNonFullAccess), ErrorCategory.InvalidOperation, null); } if (base.Instance.AccessRights != null && base.Instance.AccessRights.Length != 0) { if (Array.Exists <MailboxRights>(base.Instance.AccessRights, (MailboxRights right) => (right & MailboxRights.SendAs) == MailboxRights.SendAs)) { base.WriteError(new InvalidOperationException(Strings.ErrorSetSendAsOnMailboxPermissionNotAllowed), ErrorCategory.InvalidOperation, null); } } } TaskLogger.LogExit(); }
protected override void InternalBeginProcessing() { base.InternalBeginProcessing(); if (this.Trustee != null) { this.trusteeSid = SecurityPrincipalIdParameter.GetUserSid(base.TenantGlobalCatalogSession, this.Trustee, new Task.TaskErrorLoggingDelegate(base.WriteError), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose)); } }
protected override void InternalValidate() { TaskLogger.LogEnter(); base.InternalValidate(); if (base.IsInherited) { return; } if (this.Owner != null) { this.owner = SecurityPrincipalIdParameter.GetUserSid(base.GlobalCatalogRecipientSession, this.Owner, new Task.TaskErrorLoggingDelegate(base.WriteError), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose)); } TaskLogger.LogExit(); }
protected override void InternalBeginProcessing() { TaskLogger.LogEnter(); base.InternalBeginProcessing(); this.readOnlyRecipientSession = PermissionTaskHelper.GetReadOnlyRecipientSession(this.DomainController); if (this.readOnlyRecipientSession.UseGlobalCatalog) { this.globalCatalogRecipientSession = this.readOnlyRecipientSession; } else { this.globalCatalogRecipientSession = PermissionTaskHelper.GetReadOnlyRecipientSession(null); } if (this.User != null) { this.securityPrincipal = SecurityPrincipalIdParameter.GetUserSid(this.GlobalCatalogRecipientSession, this.User, new Task.TaskErrorLoggingDelegate(base.ThrowTerminatingError), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose)); } TaskLogger.LogExit(); }