Пример #1
0
 protected override string GetRunspaceServerSettingsToken()
 {
     if (Datacenter.IsMultiTenancyEnabled() && RbacPrincipal.Current.IsAdmin && !OrganizationId.ForestWideOrgId.Equals(RbacPrincipal.Current.RbacConfiguration.OrganizationId))
     {
         return(RunspaceServerSettings.GetTokenForOrganization(RbacPrincipal.Current.RbacConfiguration.OrganizationId));
     }
     return(base.GetRunspaceServerSettingsToken());
 }
Пример #2
0
 private ADServerSettings CreateServerSettings(OrganizationId orgId, bool useDCInAnySite)
 {
     if (orgId == null || ADSessionSettings.IsForefrontObject(orgId.PartitionId) || orgId.Equals(OrganizationId.ForestWideOrgId))
     {
         return(null);
     }
     return(RunspaceServerSettings.CreateGcOnlyRunspaceServerSettings(RunspaceServerSettings.GetTokenForOrganization(orgId), orgId.PartitionId.ForestFQDN, useDCInAnySite));
 }
            // Token: 0x06000E81 RID: 3713 RVA: 0x00057330 File Offset: 0x00055530
            protected override void InitializeRunspace(Runspace runspace)
            {
                base.InitializeRunspace(runspace);
                string token = (this.organizationId == OrganizationId.ForestWideOrgId) ? "RootOrg" : RunspaceServerSettings.GetTokenForOrganization(this.organizationId);
                RunspaceServerSettings runspaceServerSettings;

                if (this.organizationId != null && !this.organizationId.PartitionId.IsLocalForestPartition())
                {
                    runspaceServerSettings = RunspaceServerSettings.CreateGcOnlyRunspaceServerSettings(token, this.organizationId.PartitionId.ForestFQDN, false);
                    runspaceServerSettings.RecipientViewRoot = ADSystemConfigurationSession.GetRootOrgContainerId(null, null).DomainId;
                }
                else
                {
                    runspaceServerSettings = RunspaceServerSettings.CreateGcOnlyRunspaceServerSettings(token, false);
                }
                runspace.SessionStateProxy.SetVariable(ExchangePropertyContainer.ADServerSettingsVarName, runspaceServerSettings);
            }
Пример #4
0
        internal static bool GetDomainControllerAffinityForOrganization(OrganizationId orgId, out ADServerInfo preferredDomainController)
        {
            if (orgId == null || orgId.ConfigurationUnit == null || orgId == OrganizationId.ForestWideOrgId)
            {
                preferredDomainController = null;
                return(false);
            }
            ADRunspaceServerSettingsProvider instance = ADRunspaceServerSettingsProvider.GetInstance();
            bool flag;

            preferredDomainController = instance.GetGcFromToken(orgId.PartitionId.ForestFQDN, RunspaceServerSettings.GetTokenForOrganization(orgId), out flag, true);
            return(true);
        }