예제 #1
0
        public void CheckCapabilities(SaDataModel data)
        {
            if (Entries == null || Entries.Count == 0)
            {
                return;
            }

            foreach (SaEntry entries in Entries)
            {
                bool flag = false;

                foreach (SaEntry dEntries in data.Entries)
                {
                    if (entries.IsServer == dEntries.IsServer)
                    {
                        if (HasWildCard(dEntries.Name))
                        {
                            if (entries.Name.IndexOf(dEntries.Name.Substring(0, dEntries.Name.Length - 1), StringComparison.Ordinal) == 0)
                            {
                                flag = true;
                                break;
                            }
                        }
                        else if (dEntries.Name == entries.Name)
                        {
                            flag = true;
                            break;
                        }
                    }
                }

                if (!flag)
                {
                    throw new ArgumentException($"{entries.Name} is not allowed, based on SrvAccessControlDescriptor.");
                }
            }
        }
예제 #2
0
 public SaDescriptorModel(SaDataModel data)
 {
     Entries = data.Entries;
 }