【问题标题】:Cannot update or delete an inherited permission on a shared drive item无法更新或删除共享云端硬盘项目的继承权限
【发布时间】:2020-06-16 21:29:06
【问题描述】:

用例: * 创建了一个共享驱动器“Demo_Folder” * 对于“用户 A” - 授予内容管理员访问权限。对于“用户 B” - 授予查看者访问权限。 * 将 3 个文件(file1.sv、file2.csv 和 file3.csv)上传到 Demo_Folder * 对于 file3.csv,我想为“用户 B”提供编辑器访问权限。我能够通过 UI 做到这一点。但是,我无法使用 API 执行此操作。

代码如下:

权限 = {u'role':u'writer'} service.permissions().update(fileId=file_id,supportsAllDrives=True,permissionId=permission_id, body=permission).execute()

错误: googleapiclient.errors.HttpError: https://www.googleapis.com/drive/v3/files//permissions/?alt =json&supportsAllDrives=true 返回“无法更新或删除共享驱动器项目上的继承权限。”>

【问题讨论】:

    标签: google-drive-api google-apis-explorer google-drive-shared-drive


    【解决方案1】:

    不可能对共享驱动器中的文件进行这种精细的权限更新。您只能使用 fileId 字段中的 ID 更新整个 Shared Drive 文件夹的权限。

    提交功能请求

    请随时在此处申请此新功能:https://issuetracker.google.com/issues/new?component=191650&template=824106

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多