コード例 #1
0
        internal static void ValidateExecutingUserHasGroupManagementRights(ADObjectId user, ADGroup group, ExchangeRunspaceConfiguration exchangeRunspaceConfiguration, Task.ErrorLoggerDelegate writeError)
        {
            List <ADObjectId> list = new List <ADObjectId>();

            if (exchangeRunspaceConfiguration != null)
            {
                list.AddRange(exchangeRunspaceConfiguration.GetNestedSecurityGroupMembership());
            }
            if (user != null && !list.Contains(user))
            {
                list.Add(user);
            }
            RecipientTaskHelper.ValidateUserIsGroupManager((list != null) ? list.ToArray() : new ADObjectId[0], group, writeError, false, null);
        }
コード例 #2
0
        // Token: 0x06001476 RID: 5238 RVA: 0x0004C1F4 File Offset: 0x0004A3F4
        protected override ADObjectId[] GetNestedSecurityGroupMembership(ADRawEntry user)
        {
            OrganizationId organizationId = (OrganizationId)user[ADObjectSchema.OrganizationId];

            if (organizationId != null)
            {
                ExTraceGlobals.RunspaceConfigTracer.TraceDebug(0L, "[RwsExchangeRunspaceConfiguration::GetNestedSecurityGroupMembership] Create ADSessionSettings from OrgId!");
                using (new MonitoredScope("ExchangeRunspaceConfiguration", "GetNestedSecurityGroupMembership", AuthZLogHelper.AuthZPerfMonitors))
                {
                    ADSessionSettings sessionSettings = ADSessionSettings.FromAllTenantsOrRootOrgAutoDetect(organizationId);
                    IRecipientSession tenantOrRootOrgRecipientSession;
                    using (new MonitoredScope("ExchangeRunspaceConfiguration", "GetNestedSecurityGroupMembership.GetTenantOrRootOrgRecipientSession", AuthZLogHelper.AuthZPerfMonitors))
                    {
                        tenantOrRootOrgRecipientSession = DirectorySessionFactory.Default.GetTenantOrRootOrgRecipientSession(ConsistencyMode.IgnoreInvalid, sessionSettings, 101, "GetNestedSecurityGroupMembership", "f:\\15.00.1497\\sources\\dev\\Configuration\\src\\ObjectModel\\rbac\\RwsExchangeRunspaceConfiguration.cs");
                    }
                    return(ExchangeRunspaceConfiguration.GetNestedSecurityGroupMembership(user, tenantOrRootOrgRecipientSession, AssignmentMethod.All));
                }
            }
            ExTraceGlobals.RunspaceConfigTracer.TraceDebug(0L, "[RwsExchangeRunspaceConfiguration::GetNestedSecurityGroupMembership] OrgId == null");
            return(base.GetNestedSecurityGroupMembership(user));
        }