Organizing Users into Groups with API

73 views
Skip to first unread message

Jake

unread,
Apr 25, 2012, 9:42:03 AM4/25/12
to google-app...@googlegroups.com
Hey All,

I have a couple questions regarding the
Domain Info and Management API.
A little background information. I work for a small company and one of our product areas happens to be hosting Moodle sites for schools.
A few of our customers have an older, "Moodle Plugin" installed that allows them to synchronize their Moodle users with Google Apps. 
I am working with some Google Apps Integration code, that was originally written by a company called Moodle Rooms. This plugin does a number things.

The specific features for the Google Apps plugin are:
  • Moodle users are automatically created in Google Apps (Google Docs, Calendar, and Gmail).
  • When you log in to Moodle, you are automatically logged in to Google Apps.
  • A Gmail block in Moodle displays your latest Gmail messages when you login to the Moodle Front Page.
  • A Google Apps block on the Moodle Front Page displays links to your Google Start Page, Google Docs, Google Calendar and Gmail.
  • A Google Widget that shows a link to Moodle on the Google side.

The plugin does all that it was intended to do. However, a specific school that we host would like the functionality to add Moodle Users to a group in Google apps. Users will be organized into groups in order to control permissions. A likely scenario might be; students in a school, that are Moodle users, have access to all of the Google Apps functionality (Gmail, Documents, Calender...etc). A district wants to restrict what functionality students in a grade-range have. For example, grades K-5 should be able to use the Google Documents, but not Gmail or Google Calender.

My questions are:

  • Can I add a group attribute to a user when they are synchronized/added to Google?
  • If I can pragmatically add a user to group, then can I also restrict what features that user has access to?
  • If either or both of these ideas are possible/plausible with Google's API how might I go about do so?
  • Has anyone else attempted something of this nature before?

I am aware that this functionality is already present for an administrative to control on the front end with Google's dashboard for groups. I am unsure if I can do these things in their entirety. Any advice or link to documentation would be greatly appreciated.

I have been reading on the documentation here, but I thought I would look for a little more insight.

Thanks,

-> Jake

Claudio Cherubino

unread,
Apr 25, 2012, 12:40:01 PM4/25/12
to google-app...@googlegroups.com
Hi Jake,

You can use the Provisioning API to assign users to Organization Units and use the control panel to enable/disable the various services to those OUs:


Claudio

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/6TZkYX5pawMJ.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Jake Vath

unread,
Apr 25, 2012, 2:28:25 PM4/25/12
to google-app...@googlegroups.com
Hi Claudio,

Thanks for the reply!
I forgot to mention that the MoodleRooms code is written in PHP using the Zend framework.
I see that there is only implementation examples for Java, Python, and C# (.NET).
Does the same functionality exist for PHP in Zend?
If not, do you think there is a solution for what my problem?

-> Jake

Claudio Cherubino

unread,
Apr 25, 2012, 4:29:48 PM4/25/12
to google-app...@googlegroups.com
Hi Jake,

The PHP library doesn't support those experimental features yet, perhaps you might try implementing them yourself using the rest of the source code as reference.
As an alternative, you can send raw HTTP requests implementing the protocol using cURL.

Claudio

Jake Vath

unread,
Apr 25, 2012, 4:52:56 PM4/25/12
to google-app...@googlegroups.com
Claudio,

The PHP library doesn't support those experimental features yet, perhaps you might try implementing them yourself using the rest of the source code as reference.
Hmm, that's an idea.
Would I be able to make all the necessary function calls and user operations even without the support of the Zend framework?

As an alternative, you can send raw HTTP requests implementing the protocol using cURL.
I see that this looks like my only alternative to at this time. 
In your opinion, is this a good solution for a work-around?

The PHP library doesn't support those experimental features yet [...]
If you had to speculate as to when this feature might be implemented by Google/Zend, when (if ever) would that be?

Thanks for your feedback, I really appreciate it.

On a side note, I see that you are a Google employee.
Are you a software engineer on the team working the Google Apps API?
Just curious. 

-> Jake

Claudio Cherubino

unread,
Apr 25, 2012, 4:59:42 PM4/25/12
to google-app...@googlegroups.com
Answers inline:

On Wed, Apr 25, 2012 at 1:52 PM, Jake Vath <jake...@gmail.com> wrote:
Claudio,

The PHP library doesn't support those experimental features yet, perhaps you might try implementing them yourself using the rest of the source code as reference.
Hmm, that's an idea.
Would I be able to make all the necessary function calls and user operations even without the support of the Zend framework?

I'd recommend to use the Zend Framework, it will take care of a lot of low-level operations for you.
 

As an alternative, you can send raw HTTP requests implementing the protocol using cURL.
I see that this looks like my only alternative to at this time. 
In your opinion, is this a good solution for a work-around?

It is definitely a good solution for a workaround, easier than writing the PHP code, but it doesn't integrate with the rest of the application as well as that.
 

The PHP library doesn't support those experimental features yet [...]
If you had to speculate as to when this feature might be implemented by Google/Zend, when (if ever) would that be?

Unfortunately we don't control that library, so I don't really know about its release plan.
 

Thanks for your feedback, I really appreciate it.

On a side note, I see that you are a Google employee.
Are you a software engineer on the team working the Google Apps API?

I'm an engineer in the Google Apps API team, I'm currently focusing on the Google Drive SDK.

Jake Vath

unread,
Apr 25, 2012, 5:24:32 PM4/25/12
to google-app...@googlegroups.com
Claudio,

Unfortunately we don't control that library, so I don't really know about its release plan.
I'll have to ask someone over at Zend about their release schedule. 

[...] it doesn't integrate with the rest of the application as well as that.
Ahh therein lies the problem. A hack like this will almost certainly come back to haunt me in the future.

I'm an engineer in the Google Apps API team, I'm currently focusing on the Google Drive SDK.
That's pretty neat. You guys at Google never cease to amaze me... Keep up the great work!
Hopefully, when I get some free time, I'll get to play with Google drive. I still need to download it :/

Thank you so much for all the feedback that you have given me.
really really really appreciate it.
You have been more than helpful.

-> Jake
Reply all
Reply to author
Forward
Message has been deleted
0 new messages