Mercurial > moin > 1.9
changeset 954:a7e98fd10e97
Added dummy auth token methods for XMLRPC, reworded comments.
author | Alexander Schremmer <alex AT alexanderweb DOT de> |
---|---|
date | Thu, 29 Jun 2006 12:36:32 +0200 |
parents | 3abaabbe631e |
children | 05b7c435a3d6 |
files | MoinMoin/xmlrpc/__init__.py |
diffstat | 1 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py Thu Jun 29 01:05:53 2006 +0200 +++ b/MoinMoin/xmlrpc/__init__.py Thu Jun 29 12:36:32 2006 +0200 @@ -493,18 +493,34 @@ for hit in results.hits] def xmlrpc_getMoinVersion(self): + """ Returns a tuple of the MoinMoin version: + (project, release, revision) + """ from MoinMoin import version return (version.project, version.release, version.revision) - + # authorization methods + + def xmlrpc_getAuthToken(self, username, password, *args): + """ Returns a token which can be used for authentication + in other XMLRPC calls. """ + return "foo" + + def xmlrpc_applyAuthToken(self, auth_token, method_name, *args): + # do something with token XXX + return self.dispatch(method_name, args) + # XXX BEGIN WARNING XXX # All xmlrpc_*Attachment* functions have to be considered as UNSTABLE API - # they are neither standard nor are they what we need when we have switched # attachments (1.5 style) to mimetype items (hopefully in 1.6). - # They are likely to get removed again when we remove AttachFile module. - # So use them on your own risk. + # They will be partly removed, esp. the semantics of the function "listAttachments" + # cannot be sensibly defined for items. + # If the first beta or more stable release of 1.6 will have new item semantics, + # we will remove the functions before it is released. def xmlrpc_listAttachments(self, pagename): """ Get all attachments associated with pagename + Deprecated. @param pagename: pagename (utf-8) @rtype: list