Google Drive API和群组分享问题 [英] Issue with Google Drive API and group sharing

查看:320
本文介绍了Google Drive API和群组分享问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Drive开发的应用程序遇到问题。



我有一个Google组,里面有一些用户,我共享一个集合与这个组合。
当我尝试使用Google Drive API(files()。list())查找这个集合时,作为这个组的用户之一,集合显示正确。


$ b但是,如果我向该群组添加其他用户(使用API​​或Google CPanel),并尝试以该用户身份使用Google Drive API查找该集合,则该集合不会显示,就好像该用户如果我通过浏览器手动打开一次集合,那么该集合将显示在集合中通过Drive API。



这是正常行为吗?在我的用例中,我不能期望用户可以在浏览器中打开与他们共享的每个集合,以便应用程序正常工作。



任何见解?这种行为是预期的。这里有一些我从与b $ b Google Enterprise支持中的天使进行交换的摘录(改正了拼写错误并强调了我的意见):


问题,我们需要向您澄清预期的行为。当向用户添加用户时,此用户组必须再次添加,以便与之共享的任何文件。



以前提供的所有信息均来自Drive UI的内部文档;但是SDK的功能相同,因此,组必须删除并添加回添加到添加新成员后才能访问文件/文件夹的用户列表中。


所以,你有它。不知道@Burcu会不会再回来确认。



< EDIT>它变得更糟。根据此Google文档,拥有超过200名成员的组将从不查看与他们共享的文件,即使您删除并添加了群组。 < / EDIT>



无用的回答后的咆哮如下:

这种行为即使是预计的谷歌,似乎没有适当的文件,它既不是预期也不可用的服务的客户。我们应该如何知道用户何时被添加到具有共享项目的组?我们是否应该不断监控小组成员以及维护与小组共享的所有内容的清单,然后*在成员资格发生变化时与小组分享*,以便获得一致的行为?这让我想知道Google为什么不在后端这样做;注册成员变更时触发组的回调列表并不昂贵。而且我们实际 unshare 的要求更加奇怪,因为它需要一段很短的时间,在这段时间内组中没有人可以访问资源。

I'm facing an issue with an application I'm developing using Google Drive.

I have a Google group with some users inside, and I share a collection with this group. When I try to find this collection using Google Drive API (files().list()), as one of the users of this group, the collection shows up properly.

However, if I add another user to the group (either using API or Google CPanel), and try to find the collection using Google Drive API as this user, the collection doesn't show up, as if the user is not able to see it even though he is in a group allowed to see the collection.

If I manually open once the collection through my browser, then the collection is showing through Drive API.

Is this a normal behaviour ? In my use case I cannot expect from the users to open in their browser each and every collection shared with them in order for the application to work.

Any insight?

解决方案

I opened a Google Support case about this and apparently this behavior is "expected". Here are some excerpts from my exchange with "Angel" from Google Enterprise Support (typos corrected and emphasis mine):

After reviewing the stackoverflow question, we need to clarify to you that the behavior shown is expected. When adding a user to a group, this group must be added again for any files that it has been shared with.

and

All information previously provided is from internal documentation for Drive UI; however the functionality is the same for SDK, therefore, group must be deleted and added back to the list of users that have access to files/folders after adding a new member.

So, there you have it. Not sure if @Burcu will ever come back and confirm.

<EDIT> It gets worse. According to this Google document, groups with more than 200 members will never see files shared with them, even if you delete and add the group back. </EDIT>

Useless post-answer rant follows:

This behavior, even if it is "expected" by Google, does not seem to be properly documented, and it is neither expected nor usable by clients of the service. How are we supposed to know when a user has been added to a group that has items shared with it? Are we supposed to constantly monitor group memberships as well as maintain a list of all things shared with the group and then *re*share them with the group when the membership changes, just to get consistent behavior? It makes me wonder why Google doesn't already do this on the back end; it can't be that expensive to register a list of callbacks with a group that are triggered upon membership changes. And the requirement that we actually unshare is even more bizarre, since it necessitates a short period of time during which nobody in the group can access the resource.

这篇关于Google Drive API和群组分享问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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