Personal tools

Apr 13, 2010

GDIP: Integration of Google Docs services in Plone

Packages for integration of Google Docs services in Plone were released on pypi and on

The purpose of GDIP is to provide the Google Docs services to Plone users.


  • Plone users can save their files on Google servers, instead of in the ZODB;

  • Plone users have multiple access points to your files: they can manage their documents using two systems: Plone and Google Docs;

  • Plone users can edit their documents directly from the Google Docs application, embedding that page in the current window of the Plone application;

The products collective.googleauthentication, collective.googlesystemstorage, collective.googlesharing and collective.googlemodifycontent provide the integration of Google Docs services in Plone.

Packages were released on pypi:

and on


The system integrates Google Docs services in Plone using the gdata-python library provided by Google, which in turn uses the Google API.

GOOGLE AUTHENTICATION collective.googleauthentication

To let the Plone application access the documents stored on Google servers, it is necessary to complete the authentication procedure for Web applications provided by Google Docs. The procedure allows Web applications to authenticate users through their Google accounts. For security reasons, the application acquires an authentication token which will later be used to dowload or upload documents from Google servers without explicitly providing the user's credentials. The Plone user is redirected to a Google page that invites him to insert his credentials. Once he logs in with his Google account, the user is asked to authorize the Plone application to access his documents. Then, if the user grants access, he is pointed again to the Plone site. The URL of the last redirection embeds the authentication token which, as mentioned above, allows the Plone application to access the user's documents on Google servers for the following requests. GA inititates the authentication procedure upon Google Docs immediately after the user has logged into the Plone application. The procedure will be executed just once, as when the Plone application obtains the authentication token, it will store as an attribute, google_token, in the user profile.

GOOGLE SYSTEM STORAGE collective.googlesystemstorage

GSS saves the document types supported by the Google Docs service on the Google servers, while storing all the other files in the local filesystem, so that Plone users to access their files from both the Plone application and their Google Docs account. GSS extends FSS through a meta ZCML directive will trigger the adoption of GSS as storage. GSS provides several utility methods: a method that takes an authentication token and returns a client for Google Docs, methods that take care of uploading, downloading and deleting the documents on Google servers, and a method that performs queries on documents stored on Google servers.

GOOGLE SHARING collective.googlesharing

GS manages the sharing of documents stored in the Google servers and their synchronization from the Plone application to Google Docs service. In this way, when a Plone user changes the roles of other users on a specific document, GS changes the document sharing attributes in the Google Docs service accordingly. So, if a Plone user assigns another user the Editor role on one of his documents, the other user will be able to read and modify that document through his Google account. To associate Plone and Google accounts, the system assumes that the email address attribute of Plone users corresponds to their Google account. The sharing attributes of documents stored in Google servers is managed through the feed access control list (ACL), a list that shows the Google users that have access to a specific resource. GS redefines the googlesharing view to perform the mapping of roles and the ACL feed retrieval and changing operations.

GOOGLE MODIFY CONTENT collective.googlemodifycontent

GMC extends the Plone content Edit function by adding the GoogleModify operation, which only applies to documents stored on Google servers. GMC embeds the Google Docs application inside the GoogleModify panel, allowing Plone users to edit their documents directly from the Google Docs application. GMC provides the new googlemodifycontent view, that takes care of discovering the specific URL of the Google Docs document function and of embedding that page in the current window of the Plone application.


One idea for improving the system is using the workflow, instead of directly manipulating roles and permissions associated with content.

Filed under: , ,
comments powered by Disqus