[Commits] (morgen) Hooking up webdav "account" username/password to stuart's code. When you

commits at osafoundation.org commits at osafoundation.org
Fri Aug 27 14:38:03 PDT 2004


Commit by: morgen
Modified files:
chandler/application/Parcel.py 1.28 1.29
chandler/application/dialogs/PublishCollection.py 1.8 1.9
chandler/parcels/osaf/framework/sharing/Sharing.py 1.12 1.13
chandler/parcels/osaf/framework/webdav/Dav.py 1.12 1.13

Log message:
Hooking up webdav "account" username/password to stuart's code.  When you
publish a collection, it will now use server, path, username, and password
settings from Account prefs dialog box.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/application/Parcel.py.diff?r1=text&tr1=1.28&r2=text&tr2=1.29
http://cvs.osafoundation.org/index.cgi/chandler/application/dialogs/PublishCollection.py.diff?r1=text&tr1=1.8&r2=text&tr2=1.9
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/Sharing.py.diff?r1=text&tr1=1.12&r2=text&tr2=1.13
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/webdav/Dav.py.diff?r1=text&tr1=1.12&r2=text&tr2=1.13

Index: chandler/application/Parcel.py
diff -u chandler/application/Parcel.py:1.28 chandler/application/Parcel.py:1.29
--- chandler/application/Parcel.py:1.28	Tue Aug 24 08:06:39 2004
+++ chandler/application/Parcel.py	Fri Aug 27 14:37:59 2004
@@ -357,6 +357,11 @@
             # the "filesToParse" list:
             for directory in self.path:
                 for root, dirs, files in os.walk(directory):
+
+                    # Allows you to skip specific parcels
+                    if 'noload' in files:
+                        continue
+
                     if 'parcel.xml' in files:
                         repoPath = "//parcels/%s" % root[len(directory)+1:]
                         repoPath = repoPath.replace(os.path.sep, "/")

Index: chandler/parcels/osaf/framework/webdav/Dav.py
diff -u chandler/parcels/osaf/framework/webdav/Dav.py:1.12 chandler/parcels/osaf/framework/webdav/Dav.py:1.13
--- chandler/parcels/osaf/framework/webdav/Dav.py:1.12	Mon Aug 23 14:56:03 2004
+++ chandler/parcels/osaf/framework/webdav/Dav.py	Fri Aug 27 14:38:01 2004
@@ -6,6 +6,9 @@
 import application.Globals as Globals
 import Sync
 
+#@@@ Temporary way for retrieving webdav 'account' information
+import osaf.framework.sharing.Sharing
+
 """
  * If I make ItemCollections use a refcollection under the hood as a real attribute
    then I can get rid of most of the code in put/getCollection as it will just do
@@ -102,4 +105,5 @@
         port = url.port or 80
 
         davlib.DAV.__init__(self, host, port)
-        self.setauth('test', 'test')
+        acct = osaf.framework.sharing.Sharing.getWebDavAccount()
+        self.setauth(acct.username, acct.password)

Index: chandler/parcels/osaf/framework/sharing/Sharing.py
diff -u chandler/parcels/osaf/framework/sharing/Sharing.py:1.12 chandler/parcels/osaf/framework/sharing/Sharing.py:1.13
--- chandler/parcels/osaf/framework/sharing/Sharing.py:1.12	Fri Aug 27 14:05:49 2004
+++ chandler/parcels/osaf/framework/sharing/Sharing.py	Fri Aug 27 14:38:00 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.12 $"
-__date__ = "$Date: 2004/08/27 21:05:49 $"
+__version__ = "$Revision: 1.13 $"
+__date__ = "$Date: 2004/08/27 21:38:00 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -112,6 +112,9 @@
     else:
         return None
 
+def getWebDavAccount():
+    return Globals.parcelManager.lookup(SHARING, 'WebDAVAccount')
+
 # Non-blocking methods that the mail thread can call to post events to the
 # main thread:
 

Index: chandler/application/dialogs/PublishCollection.py
diff -u chandler/application/dialogs/PublishCollection.py:1.8 chandler/application/dialogs/PublishCollection.py:1.9
--- chandler/application/dialogs/PublishCollection.py:1.8	Fri Aug 27 14:05:49 2004
+++ chandler/application/dialogs/PublishCollection.py	Fri Aug 27 14:37:59 2004
@@ -9,9 +9,6 @@
 import application.dialogs.Util
 import osaf.framework.sharing.Sharing
 
-#@@@ This will go away:
-DEFAULT_URL = "http://code-bear.com/dav"
-
 class PublishCollectionDialog(wx.Dialog):
     def __init__(self, parent, resources, collection):
         pre = wx.PreDialog()
@@ -33,9 +30,8 @@
             if path:
                 self.urlText.SetValue("%s/%s" % (path, collection.itsUUID))
             else:
-                #@@@ This will go away:
-                self.urlText.SetValue("%s/%s" % (DEFAULT_URL, 
-                 collection.itsUUID))
+                self.urlText.SetValue("http://server/path/%s" % \
+                 collection.itsUUID)
 
         self.inviteesText = wx.xrc.XRCCTRL(self, "ID_INVITEES")
 



More information about the Commits mailing list