view MoinMoin/xmlrpc/WhoAmI.py @ 1918:bb2e053067fb

fixing copyright headers: remove umlauts (encoding troubles), make epydoc compatible, reformat
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 27 Mar 2007 21:07:33 +0200
parents 56d74783ea93
children 1b0629547090
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - Tells who you are and whether the wiki trusts you.

    @copyright: 2005 MoinMoin:ThomasWaldmann
    @license: GNU GPL, see COPYING for details.
"""

def execute(xmlrpcobj, *args):
    request = xmlrpcobj.request
    username = request.user.name
    if not username:
        username = "<unknown user>"
    valid = request.user.valid
    trusted = request.user.trusted
    result = "You are %s. valid=%d, trusted=%d." % (username.encode("utf-8"), valid, trusted)
    return xmlrpcobj._outstr(result)