权限资源的值属性未填充到响应中 [英] value attribute for Permissions Resource not populated in responses

查看:88
本文介绍了权限资源的值属性未填充到响应中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

观看:

https://developers.google.com/drive/v2/reference/permissions#resource



包含电子邮件地址值的值属性ACL不会被API返回。目前尚不清楚为什么价值未被返还,我认为这是一个隐私问题,但这意味着Drive SDK无法支持文档迁移(从一个Google帐户到另一个),使用旧文档列表API v3可以执行的情况:



https://开发人员。 google.com/google-apps/documents-list/#retrieving_the_acl_for_a_document_file_or_collection



现在我正在考虑将Drive API和Docs v3 API范围同时添加到我的项目,只是使用Docs API调用来检索ACL,但理想情况下我只能使用Drive API调用。我错过了什么?可以添加一个特殊的范围到Drive API,以允许ACL电子邮件地址检索,或者有其他方式来处理这个问题?



Jay


<由于此问题已发布,因此Drive API已更新为允许在 permissionId

=https://developers.google.com/drive/v2/reference/permissions/insert =nofollow> permissions.insert() id 属性)。这允许ACL的迁移,而无需知道电子邮件地址(只需将permissionIds直接复制到新文件中)。



另外:




  • permissions.getIdForEmail() API调用提供了一种快速获取给定电子邮件地址的ID的方法


  • permissions.get()或permissions.insert(),<$ c $包含c> domain 属性,这应该有助于确定ACL是否引发安全问题。

  • >我相信这些功能涵盖了大多数需要实际ACL电子邮件地址检索的用例。


    Looking at:

    https://developers.google.com/drive/v2/reference/permissions#resource

    the values attribute which contains the email address value for the ACL is not returned by the API. It's not clear why the value isn't returned, I assume it's a privacy issue but it means Drive SDK can't support document migration (from one Google account to another) use cases where the old Documents List API v3 can:

    https://developers.google.com/google-apps/documents-list/#retrieving_the_acl_for_a_document_file_or_collection

    for now I'm looking at adding both Drive API and Docs v3 API scopes for my project and just using the Docs API call to retrieve the ACLs but ideally I'd be able to use just Drive API calls. Am I missing anything? Could a special scope be added to Drive API that allows ACL email address retrieval or is there some other way to handle this?

    Jay

    解决方案

    Since this question was posted, Drive API has been updated to allow permissionId to be sent on permissions.insert() (the id attribute). This allows for migration of ACLs without ever needing to know the email addresses (just straight copy the permissionIds over to the new file).

    Additionally:

    I believe these features cover most use cases where the actual ACL email address retrieval was needed.

    这篇关于权限资源的值属性未填充到响应中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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