Beispiel #1
0
        public bool LoginUser(string userName, string password)
        {
            //if (String.IsNullOrEmpty(userName)) throw new ArgumentException("The value cannot be null or empty.", "userName");
            //if (String.IsNullOrEmpty(password)) throw new ArgumentException("The value cannot be null or empty.", "password");

            ADMembership adHelper = new ADMembership();

            return(adHelper.LoginUser(userName, password));
        }
Beispiel #2
0
        public bool ValidateUserRole(string userName, Role role)
        {
            bool result = false;
            //if (String.IsNullOrEmpty(userName)) throw new ArgumentException("The value cannot be null or empty", "userName");

            ADMembership adHelper = new ADMembership();

            List <string> list = adHelper.GetUserRoles(userName, role.Aplication, role.System);

            if (list.Contains(role.DNRol))
            {
                result = true;
            }

            return(result);
        }