コード例 #1
0
        public static List <Role> GetRolesForUser()
        {
            User user = MADUsers.GetUser();

            if (user == null)
            {
                return(new List <Role>());
            }
            return(GetRolesForUser(user.UserName));
        }
コード例 #2
0
        public static List <Role> GetRolesForUser(string userName)
        {
            User user = MADUsers.GetUser(userName);

            return(dataProvider.GetUserRoles(user.UserID));
        }