Google云端硬盘通过服务帐号更改权限 [英] Google Drive changing permissions by service account

查看:2898
本文介绍了Google云端硬盘通过服务帐号更改权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

寻找适用于Google Apps网域管理员的最佳方法,以修改其他用户拥有的Google云端硬盘对象的权限。我将在Google App Engine上开发应用程序。

使用双方OAuth和Google文档列表API很简单: https://developers.google.com/gdata/docs/auth/oauth#2LeggedOAuth 但现在Google Drive SDK是实时API,我发现服务帐户是鼓励的方法:谷歌驱动API支持2腿oauth吗? https://developers.google.com/accounts/docs/OAuth2ServiceAccount 。因此,我正在使用此方法和Prediction API的示例: https://开发人员。 google.com/appengine/articles/prediction_service_accounts ,并且无法在API控制台的团队部分中使用GAE服务帐户。获取错误信息:用户xxx@appspot.gserviceaccount.com不能添加到项目New Proj Name中,只能添加域myappsdomain.com中的成员。



因此,我基本上问的是:
1)您如何使用Google Drive SDK的服务帐户进行管理任务,如更改权限
2)以及使用Drive API的所有可行的GAE服务帐户教程与非域用户。

解决方案

有关服务帐户和用户模拟的文档刚刚添加:



https://developers.google.com/drive/service-帐户



https:/ /developers.google.com/drive/user-impersonation



不幸的是,Google云端硬盘尚不支持App Engine服务帐户。


Looking for the best current approach for admins of a Google Apps domain to modify the permissions of a Google Drive object owned by other users. I'll be developing the app on Google App Engine.

It was straightforward using 2 legged OAuth and the Google Documents List API: https://developers.google.com/gdata/docs/auth/oauth#2LeggedOAuth but now that Google Drive SDK is the live API, I see that service accounts are the encouraged method: Does google Drive api support 2 legged oauth? and https://developers.google.com/accounts/docs/OAuth2ServiceAccount . So I'm following an example that uses this approach and the Prediction API: https://developers.google.com/appengine/articles/prediction_service_accounts and you cannot use the GAE service account in the Team section of the API console. Get an error: "User xxx@appspot.gserviceaccount.com may not be added to project "New Proj Name". Only members from domain myappsdomain.com may be added.

So, I'm basically asking: 1) How do you use service accounts with Google Drive SDK for admin tasks like changing permissions 2) And any working GAE service account tutorials using the Drive API that work with non-domain users.

解决方案

The documentation about Service Accounts and user impersonation has just been added:

https://developers.google.com/drive/service-accounts

https://developers.google.com/drive/user-impersonation

Unfortunately, App Engine Service Accounts are not supported by Google Drive yet.

这篇关于Google云端硬盘通过服务帐号更改权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆