mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Update Users-Drive-Permissions.md
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
- [Remove domainCanFind-domainWithLink ACLs for internal domain](#remove-domaincanfind-domainwithlink-acls-for-internal-domain)
|
- [Remove domainCanFind-domainWithLink ACLs for internal domain](#remove-domaincanfind-domainwithlink-acls-for-internal-domain)
|
||||||
- [Remove My Drive ACLs for external domains](#remove-my-drive-acls-for-external-domains)
|
- [Remove My Drive ACLs for external domains](#remove-my-drive-acls-for-external-domains)
|
||||||
- [Remove anyoneCanFind-anyoneWithLink ACLs](#remove-anyonecanfind-anyonewithlink-acls)
|
- [Remove anyoneCanFind-anyoneWithLink ACLs](#remove-anyonecanfind-anyonewithlink-acls)
|
||||||
|
- [Target Audiences](#target-audiences)
|
||||||
|
|
||||||
## API documentation
|
## API documentation
|
||||||
* [Drive API - Permissions](https://developers.google.com/drive/api/v3/reference/permissions)
|
* [Drive API - Permissions](https://developers.google.com/drive/api/v3/reference/permissions)
|
||||||
@@ -143,6 +144,7 @@ specify `basicpermissions` and additional permission fields, e.g., `permissions.
|
|||||||
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||||
See: https://github.com/GAM-team/GAM/wiki/Collections-of-Items
|
See: https://github.com/GAM-team/GAM/wiki/Collections-of-Items
|
||||||
```
|
```
|
||||||
|
|
||||||
## GUI API permission name mapping
|
## GUI API permission name mapping
|
||||||
|
|
||||||
| GUI setting | API setting |
|
| GUI setting | API setting |
|
||||||
@@ -616,3 +618,51 @@ Delete those Shared Drive ACLs.
|
|||||||
```
|
```
|
||||||
gam config num_threads 20 redirect stdout ./DeleteSharedDriveShares.txt multiprocess redirect stderr stdout csv SharedDriveShares.csv gam user "~Owner" delete drivefileacl "~id" "id:~~permission.id~~"
|
gam config num_threads 20 redirect stdout ./DeleteSharedDriveShares.txt multiprocess redirect stderr stdout csv SharedDriveShares.csv gam user "~Owner" delete drivefileacl "~id" "id:~~permission.id~~"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Target Audiences
|
||||||
|
|
||||||
|
* See: https://support.google.com/a/answer/9934697
|
||||||
|
|
||||||
|
You can manage target audiences in the admin console at Directory/Target audiences.
|
||||||
|
If you click on a target audience the URL will look like this: `https://admin.google.com/ac/targetaudiences/02xcytpi0xrdqxi`
|
||||||
|
|
||||||
|
You can add this target audience to a file with:
|
||||||
|
```
|
||||||
|
gam user user@domain.com create drivefileacl <DriveFileID> domain 02xcytpi0xrdqxi.audience.googledomains.com role reader
|
||||||
|
User: user@domain.com, Add 1 Drive File/Folder ACL
|
||||||
|
User: user@domain.com, Drive File/Folder ID: <DriveFileID>, Permission ID: 02xcytpi0xrdqxi.audience.googledomains.com, Added
|
||||||
|
Test Audience
|
||||||
|
id: 02897912034288871303
|
||||||
|
type: domain
|
||||||
|
domain: 02xcytpi0xrdqxi.audience.googledomains.com
|
||||||
|
role: reader
|
||||||
|
permissionDetails:
|
||||||
|
role: reader
|
||||||
|
type: file
|
||||||
|
inherited: False
|
||||||
|
allowFileDiscovery: False
|
||||||
|
```
|
||||||
|
|
||||||
|
You can update the target audience role with:
|
||||||
|
```
|
||||||
|
gam user user@domain.com update drivefileacl <DriveFileID> id:02897912034288871303 role writer
|
||||||
|
User: ross@s.jaylee.us, Update 1 Drive File/Folder ACL
|
||||||
|
User: user@domain.com, Drive File/Folder ID: <DriveFileID>, Permission ID: 02897912034288871303, Updated
|
||||||
|
Test Audience
|
||||||
|
id: 02897912034288871303
|
||||||
|
type: domain
|
||||||
|
domain: 02xcytpi0xrdqxi.audience.googledomains.com
|
||||||
|
role: writer
|
||||||
|
permissionDetails:
|
||||||
|
role: writer
|
||||||
|
type: file
|
||||||
|
inherited: False
|
||||||
|
allowFileDiscovery: False
|
||||||
|
```
|
||||||
|
|
||||||
|
You can delete the target audience from a file with:
|
||||||
|
```
|
||||||
|
gam user user@domain.com delete drivefileacl <DriveFileID> id:02897912034288871303
|
||||||
|
User: user@domain.com, Delete 1 Drive File/Folder ACL
|
||||||
|
User: user@domaincom, Drive File/Folder ID: <DriveFileID>, Permission ID: 02897912034288871303, Deleted
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user