This post is going to be about the modifications I’ve made to the Zend Framework’s Gdata library for accessing Google Docs.
Another aspect of the Google Apps Provisioning API that I’ve discovered has to do with adding an owner to a group.
In my last post I talked about paging the results retrieved from the list of groups. Here it has to do with adding an owner to a group.
So I’ve gotten my implementation done. How’d I know I got it right? Well, considering that I’ve got the implementation for adding/removing/retrieving members done and working correctly, my implementation for owner is more than likely to be correct as well.
So after I’ve gotten the code done up, I tried it but to no avail. The owner wasn’t added to the group. After a few moments of pondering, I began to wonder if it was my code that was wrong, and then it struck me – the function only works on added members! So I added a member then called the function on the member, and it worked!
Conversely, removing an owner from a group does not remove the user from the group. It removes the status of owner from the user in the group i.e. an owner of the group becomes a member of the group.
The documentation on the API did not mention anything about it at all. I’m just glad I didn’t waste 3 hours trying to debug my code. Phew!
Google Apps Provisioning API is a set of API that allows other programs to access stored on Google’s servers. This is done via the Atom Publishing Protocol and HTTP requests (what the industry terms general as a RESTful interface).
The set of data that Google exposes via the Provisioning API include the user accounts and groups and other related data.
Google has improved its groups mechanism not too long ago. With this came improvements to other Google properties such as Google Docs where sharing documents with groups is possible. Previously, this was not available because the original concept of a group in Google Apps is nothing more than an email list where emailing to the “group” allowed users in the “group” to receive the email as well. But this was all that version 1 of “groups” (technically known as an email list) could do.