Beispiel #1
0
 bool IDirectorySession.GetSchemaAndApplyFilter(ADRawEntry adRawEntry, ADScope scope, out ADObject dummyObject, out string[] ldapAttributes, ref QueryFilter filter, ref IEnumerable <PropertyDefinition> properties)
 {
     FfoDirectorySession.LogNotSupportedInFFO(null);
     dummyObject    = null;
     ldapAttributes = null;
     return(false);
 }
Beispiel #2
0
        private bool IsNameUnique(string name)
        {
            ADScope scope = null;

            if (base.CurrentOrganizationId.OrganizationalUnit != null)
            {
                scope = new ADScope(base.CurrentOrganizationId.OrganizationalUnit, new ComparisonFilter(ComparisonOperator.Equal, ADObjectSchema.OrganizationalUnitRoot, base.CurrentOrganizationId.OrganizationalUnit));
            }
            return(RecipientTaskHelper.IsPropertyValueUnique(base.TenantGlobalCatalogSession, scope, null, new ADPropertyDefinition[]
            {
                ADObjectSchema.Name
            }, ADObjectSchema.Name, name, false, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), null, ExchangeErrorCategory.Client, false));
        }
Beispiel #3
0
            private CmdletQueryProcessor(Match m)
            {
                this.SnapInName = m.Groups["snapinName"].Value;
                if (string.IsNullOrEmpty(this.SnapInName))
                {
                    this.SnapInName = "Microsoft.Exchange.Management.PowerShell.E2010";
                }
                else if (this.SnapInName.IndexOf('.') == -1)
                {
                    this.SnapInName = SnapInAliasMap.GetSnapInName(this.SnapInName);
                }
                this.CmdletName          = m.Groups["cmdletName"].Value;
                this.QualifiedCmdletName = this.SnapInName + "\\" + this.CmdletName;
                CaptureCollection captures = m.Groups["parameterName"].Captures;

                if (captures.Count > 0)
                {
                    this.ParameterNames = new string[captures.Count];
                    for (int i = 0; i < this.ParameterNames.Length; i++)
                    {
                        this.ParameterNames[i] = captures[i].Value;
                    }
                }
                ADScope recipientReadScope = RbacQuery.CmdletQueryProcessor.CreateRbacScope(m.Groups["domainReadScope"].Value, false);
                ADScope configReadScope    = RbacQuery.CmdletQueryProcessor.CreateRbacScope(m.Groups["configScope"].Value, false);

                ADScopeCollection[] recipientWriteScopes = null;
                CaptureCollection   captures2            = m.Groups["domainWriteScope"].Captures;

                if (captures2.Count > 0)
                {
                    List <ADScope> list = new List <ADScope>(captures2.Count);
                    for (int j = 0; j < captures2.Count; j++)
                    {
                        ADScope adscope = RbacQuery.CmdletQueryProcessor.CreateRbacScope(captures2[j].Value, true);
                        if (adscope != null)
                        {
                            list.Add(adscope);
                        }
                    }
                    recipientWriteScopes = new ADScopeCollection[]
                    {
                        new ADScopeCollection(list)
                    };
                }
                this.ScopeSet = new ScopeSet(recipientReadScope, recipientWriteScopes, configReadScope, null);
            }
        private static bool VerifyIsWithinScopes(ADRawEntry givenObject, ADScope exclusive, ADScope customScope, ADScope readScope)
        {
            List <ADScope> list = null;

            if (exclusive != null)
            {
                list = new List <ADScope>();
                list.Add(exclusive);
            }
            List <ADScope> list2 = new List <ADScope>();

            if (customScope != null)
            {
                list2.Add(customScope);
            }
            return(ManagementReporting.VerifyIsWithinScopes(givenObject, list, list2, readScope));
        }
Beispiel #5
0
 QueryFilter IDirectorySession.ApplyDefaultFilters(QueryFilter filter, ADScope scope, ADObject dummyObject, bool applyImplicitFilter)
 {
     FfoDirectorySession.LogNotSupportedInFFO(null);
     return(filter);
 }
        private static bool VerifyIsWithinScopes(ADRawEntry givenObject, List <ADScope> exclusiveScopes, List <ADScope> customScopes, ADScope readScope)
        {
            List <ADScopeCollection> list             = null;
            ADScopeCollection        exclusiveScopes2 = null;

            if (exclusiveScopes != null && exclusiveScopes.Count > 0)
            {
                exclusiveScopes2 = new ADScopeCollection(exclusiveScopes);
            }
            if (customScopes != null && customScopes.Count > 0)
            {
                list = new List <ADScopeCollection>();
                list.Add(new ADScopeCollection(customScopes));
            }
            ADScopeException ex;

            return(ADSession.TryVerifyIsWithinScopes(givenObject, readScope, list, exclusiveScopes2, true, out ex));
        }