changeset 960:afb156d4caa5

Merge with main.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Fri, 30 Jun 2006 21:35:59 +0200
parents 5d308092d40e (diff) d825de2173d5 (current diff)
children 21eb4cb11e2c
files
diffstat 2 files changed, 53 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py	Wed Jun 28 15:13:36 2006 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Fri Jun 30 21:35:59 2006 +0200
@@ -493,18 +493,47 @@
                 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. If the token is empty, the username
+            or the password were wrong. """
+        u = user.User(self.request, name=username, password=password, auth_method='xmlrpc_gettoken')
+        if u.valid:
+            return u.id
+        else:
+            return ""
+    
+    def xmlrpc_applyAuthToken(self, auth_token):
+        """ Applies the auth token and thereby authenticates the user. """
+        u = user.User(self.request, id=auth_token, auth_method='xmlrpc_applytoken')
+        if u.valid:
+            self.request.user = u
+            return "SUCCESS"
+        else:
+            raise Exception("Invalid token.") # XXX make a distinct class
+    
+    def xmlrpc_getDiff(self, pagename, from_rev, to_rev):
+        return "NOT_IMPLEMENTED_YET"
+        
     # 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
--- a/docs/CHANGES.aschremmer	Wed Jun 28 15:13:36 2006 +0200
+++ b/docs/CHANGES.aschremmer	Fri Jun 30 21:35:59 2006 +0200
@@ -6,12 +6,14 @@
 
   ToDo:
     * Implement actual syncronisation.
-    * Implement a cross-site authentication system.
+    * Implement a cross-site authentication system, i.e. mainly an
+      identity storage.
 
   New Features:
     * XMLRPC method to return the Moin version
     * XMLRPC multicall support
     * Conflict icon in RecentChanges
+    * XMLRPC Authentication System
 
   Bugfixes (only stuff that is buggy in moin/1.6 main branch):
     * ...
@@ -22,11 +24,26 @@
   Developer notes:
     * ...
 
+Do not forget to check the related wiki page: http://moinmoin.wikiwikiweb.de/WikiSyncronisation
 
 Diary
 =====
 
-Week 21: Basic Infrastructur setup (repos), initial talks to the mentor, started writing the design document, helped other students to get started, started evaluating Mercurial as a DVCS backend
-Week 22: Tax forms, Fulfilled transcription request, written conflict icon support, refactored conflict handling, changed conflict icon, Added xmlrpc multicall support into the server and backported the client code from python 2.4
+Week 21: Basic Infrastructur setup (repos),
+         initial talks to the mentor, started writing the design document,
+         helped other students to get started
+Week 22: Tax forms, Fulfilled transcription request,
+         written conflict icon support, refactored conflict handling,
+         changed conflict icon,
+         Added xmlrpc multicall support into the server and
+         backported the client code from python 2.4
+Week 23: Debian-Sprint in Extremadura, Spain. Initial thoughts about Mercurial as a base for syncronisation.
+Week 24: Evaluation of OpenID as a base for authentication, written local testing scripts 
+Week 25: Conference in Chile.
+Week 26: Implementation of the XMLRPC authentication system.
 
-
+Time plan
+=========
+In July and August, most parts of the implementation will be finished
+from 07-10 to 07-14 and from 08-03 to 08-19. Between those time spans, there
+are exams.