code: def _get_roles(self, username):
          
          groups = self._get_groups(username)
          user_roles = self.roles.get_roles(groups)
          cherrypy.log.error(
              msg="user '" + username + "' roles: " + str(user_roles),
              severity=logging.DEBUG,
          )
          return user_roles
docs: Get roles of a user
          @str username: name of the user
          @rtype: dict, format { 'roles': [<list of roles>],
              'unusedgroups': [<list of groups not matching roles>] }