简体   繁体   English

Google Drive API共享权限

[英]Google Drive API Sharing permissions

i have written a code where i will create google drive folder and share that via Email. 我写了一个代码,我将在其中创建google drive文件夹并通过电子邮件共享。

My idea is that my added users can add, edit files and etc, but they should not have access to share them, or add new users. 我的想法是,我添加的用户可以添加,编辑文件等,但他们不应具有共享这些文件或添加新用户的权限。 I found how to do it manually, just put a tick in the advanced section, Screenshot for example: 我找到了手动操作的方法,只需在高级部分(例如屏幕截图)中打勾即可:

在此处输入图片说明

but I cant find out how i can prevent editors from changing access and adding new people with python function code. 但我无法找出如何防止编辑人员更改访问权限并使用python函数代码添加新人员的方法。 I rummaged through the entire library, but I did not find the answer, maybe it impossible? 我翻遍了整个图书馆,但找不到答案,也许不可能吗?

Check this documentation about Permissions to get you started. 查看有关权限的此文档以开始使用。

Here how it works, 这里是如何运作的,

Lists of permissions are available for each file and folder in Drive. 权限列表适用于云端硬盘中的每个文件和文件夹。 Each permission specifies a type , role , and emailAddress or domain , permitting a level of access to a file or folder. 每个权限都指定一个typeroleemailAddress或domain ,以允许对文件或文件夹的访问级别。 These values work together to limit the access appropriately. 这些值共同作用以适当地限制访问。 The type limits access to a set of users. 该类型将访问权限限制为一组用户。 The email address and domain fields specify which users can have access. 电子邮件地址和域字段指定哪些用户可以访问。 Finally, the role gives these users the ability to do something to the file, like read it. 最后,该角色使这些用户能够对文件执行某些操作,例如读取文件。 When combined, these properties define a complete permission. 组合使用时,这些属性将定义完整的权限。

You can also visit this documentation to get an insight about the basics of files and folders. 您也可以访问此文档以获取有关文件和文件夹基础知识的见解。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python Goole Drive API禁用链接共享和“高级权限” - Python Goole Drive API Disable Link Sharing & “Advanced Permissions” Google云端硬盘权限API –安全设置 - Google Drive Permissions API – security settings 尝试创建权限时出现 Google Drive API 权限错误 - Google Drive API Permissions error when attempting to create permissions Google Drive API权限,如何禁用Internet上的任何人都可以查找? - Google Drive API permissions, how to disable findable by anyone on Internet? 为 Google Drive 设置正确的权限 - Setting correct permissions for Google Drive 如何通过Python API使用Google Drive v3 API限制编辑者共享电子表格? - How to use Google Drive v3 API via Python API to restrict editors from sharing a spreadsheet? 通过Google Drive API将文件上传到服务帐户并与组共享-没有通知 - Uploading a file via the Google Drive API to a service account and sharing with a group - no notification 使用Python共享Google云端硬盘中的文件 - Sharing files in Google Drive using Python Google Drive API v3 更改文件权限并获取可公开共享的链接 (Python) - Google Drive API v3 Change File Permissions and Get Publicly Shareable Link (Python) 无法升级使用 Google Drive API v3 上传的文件的权限 - Can't upgrade permissions on file uploaded with Google Drive API v3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM