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:
@@ -11,6 +11,7 @@
|
|||||||
- [Change shares to User1 to shares to User2](#change-shares-to-user1-to-shares-to-user2)
|
- [Change shares to User1 to shares to User2](#change-shares-to-user1-to-shares-to-user2)
|
||||||
- [Map All ACLs from an old domain to a new domain](#map-all-acls-from-an-old-domain-to-a-new-domain)
|
- [Map All ACLs from an old domain to a new domain](#map-all-acls-from-an-old-domain-to-a-new-domain)
|
||||||
- [Remove all ACLs for a specific user or group email address](#remove-all-ACLs-for-a-specific-user-or-group-email-address)
|
- [Remove all ACLs for a specific user or group email address](#remove-all-ACLs-for-a-specific-user-or-group-email-address)
|
||||||
|
- [Remove anyone-anyoneWithLink ACLs](#remove-anyone-anyonewithlink-acls)
|
||||||
|
|
||||||
## 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)
|
||||||
@@ -430,4 +431,39 @@ Add Shared Drive ACLs with a different email address and the same role.
|
|||||||
gam config num_threads 20 redirect stdout ./ReplaceSharedDriveShares.txt multiprocess redirect stderr stdout csv SharedDriveShares.csv gam user "~Owner" add drivefleacl "~id" "~permission.type" newemail@domain.rom role "~permission.role"
|
gam config num_threads 20 redirect stdout ./ReplaceSharedDriveShares.txt multiprocess redirect stderr stdout csv SharedDriveShares.csv gam user "~Owner" add drivefleacl "~id" "~permission.type" newemail@domain.rom role "~permission.role"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Remove anyone-anyoneWithLink ACLs
|
||||||
|
|
||||||
|
Here are the queries that will be used in these commands:
|
||||||
|
* anyone - query "visibility='anyoneCanFind'"
|
||||||
|
* anyoneWithLink - query "visibility='anyoneWithLink'"
|
||||||
|
* both - query "(visibility='anyoneCanFind' or visibility='anyoneWithLink')"
|
||||||
|
|
||||||
|
### My Drives
|
||||||
|
|
||||||
|
Get My Drive anyone/anyoneWithLink ACLs
|
||||||
|
```
|
||||||
|
gam config auto_batch_min 1 num_threads 20 redirect csv ./MyDriveShares.csv multiprocess redirect stderr - multiprocess all users print filelist fields id,name,mimetype,basicpermissions <Query> pm type anyone em pmfilter oneitemperrow
|
||||||
|
```
|
||||||
|
|
||||||
|
Delete those My Drive ACLs.
|
||||||
|
```
|
||||||
|
gam config num_threads 20 redirect stdout ./DeleteMyDriveShares.txt multiprocess redirect stderr stdout csv MyDriveShares.csv gam user "~Owner" delete drivefleacl "~id" "id:~~permissions.id~~"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Shared Drives
|
||||||
|
Get an organizer for each Shared Drive
|
||||||
|
```
|
||||||
|
gam redirect csv ./SharedDriveOrganizers.csv print shareddriveorganizers
|
||||||
|
```
|
||||||
|
|
||||||
|
Get Shared Drive anyone/anyoneWithLink ACLs
|
||||||
|
```
|
||||||
|
gam config num_threads 20 csv_input_row_filter "organizers:regex:^.+$" redirect csv ./SharedDriveShares.csv multiprocess redirect stderr - multiprocess csv SharedDriveOrganizers.csv gam user "~organizers" print filelist select shareddriveid "~id" fields id,name,mimetype,basicpermissions,driveid showdrivename <Query> pm type anyone inherited false em pmfilter oneitemperrow
|
||||||
|
```
|
||||||
|
|
||||||
|
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 drivefleacl "~id" "id:~~permissions.id~~"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user