Example #1
0
        internal static void MultiScalarFromDirectoryEntry <T>(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName)
        {
            dSPropertyValueCollection item = properties[suggestedProperty];
            List <T> ts = new List <T>();

            foreach (object obj in item)
            {
                ts.Add((T)obj);
            }
            p.LoadValueIntoProperty(propertyName, ts);
        }
Example #2
0
        internal static void AccountControlFromDirectoryEntry(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName, bool testCantChangePassword)
        {
            dSPropertyValueCollection item = properties[suggestedProperty];

            if (item.Count != 0)
            {
                int  num  = (int)item[0];
                bool flag = SDSUtils.StatusFromAccountControl(num, propertyName);
                p.LoadValueIntoProperty(propertyName, flag);
            }
        }
Example #3
0
        static internal void MultiScalarFromDirectoryEntry <T>(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName)
        {
            dSPropertyValueCollection values = properties[suggestedProperty];

            List <T> list = new List <T>();

            foreach (object value in values)
            {
                Debug.Assert(value is T);

                list.Add((T)value);
            }

            p.LoadValueIntoProperty(propertyName, list);
        }
Example #4
0
        static internal void AccountControlFromDirectoryEntry(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName, bool testCantChangePassword)
        {
            Debug.Assert(
                (!testCantChangePassword && (String.Equals(suggestedProperty, "userAccountControl", StringComparison.OrdinalIgnoreCase))) ||
                (testCantChangePassword && (String.Equals(suggestedProperty, "UserFlags", StringComparison.OrdinalIgnoreCase)))
                );

            Debug.Assert(!String.Equals(propertyName, PropertyNames.PwdInfoCannotChangePassword, StringComparison.OrdinalIgnoreCase) || testCantChangePassword);

            dSPropertyValueCollection values = properties[suggestedProperty];

            if (values.Count != 0)
            {
                Debug.Assert(values.Count == 1);
                Debug.Assert(values[0] is int);

                int  uacValue = (int)values[0];
                bool flag;

                flag = StatusFromAccountControl(uacValue, propertyName);

                p.LoadValueIntoProperty(propertyName, flag);
            }
        }