Google Drive API文件夹权限 [英] Google Drive API Folder Permission
问题描述
如果我授予文件夹权限,是否可以不将该权限级联到子文件夹?这是文件夹结构
If I give a folder permission, is it possible to not cascade down that permission to subfolders? Here is a folder structure
文件夹A
文件夹A \文件夹B
文件夹A \文件夹C
Folder A
Folder A\Folder B
Folder A\Folder C
如果我授予文件夹A权限,我不想授予文件夹B和文件夹C权限.
If I give Folder A permission, I dont want to give folder B and Folder C permission.
当我向folderid插入权限时,它还会在该权限下提供任何权限.
When I insert permission to folderid, it also give anything under it that permission.
推荐答案
是的,您看到的是当前行为.将用户U授予文件夹A的权限后,您需要遍历子文件夹并将U从其权限中删除.如果某些孩子已经拥有这样的权限,将变得很棘手,因此您需要在更改A并进行比较之前先加载他们的权限.
Yes what you see is the current behavior. Once you give permission for user U to folder A you need to loop through the children folders and remove U from their permissions. Gets tricky if some children already had such permission so you need to load their permissions before changing A and compare.
这篇关于Google Drive API文件夹权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!