mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-24 08:01:36 +00:00
Compare commits
41 Commits
20240724.1
...
20240829.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11969364d3 | ||
|
|
b7c0a86b1f | ||
|
|
1eb1942085 | ||
|
|
7073d8b6b4 | ||
|
|
0e90d10f17 | ||
|
|
e989167267 | ||
|
|
49128d5559 | ||
|
|
d3c7af784f | ||
|
|
41dd34ec9e | ||
|
|
c565f9aa0f | ||
|
|
f40f631810 | ||
|
|
130ee7b371 | ||
|
|
4bbb97b749 | ||
|
|
3fb96aaab6 | ||
|
|
7d64ca2057 | ||
|
|
37f6a9694a | ||
|
|
77df7c5fea | ||
|
|
4fc08c78d3 | ||
|
|
c31461b9e7 | ||
|
|
1875eadbfe | ||
|
|
50ac49c713 | ||
|
|
def079d944 | ||
|
|
bc5c468581 | ||
|
|
020ddee777 | ||
|
|
3e7124946e | ||
|
|
395916bc86 | ||
|
|
e80ed0e700 | ||
|
|
8db7e32bd2 | ||
|
|
d263327997 | ||
|
|
93a6e4d835 | ||
|
|
9dab94bd7b | ||
|
|
d3a108ae9c | ||
|
|
3b39f90a0e | ||
|
|
e994c769a6 | ||
|
|
bbc974fb69 | ||
|
|
71bf658e17 | ||
|
|
8211d5df8c | ||
|
|
10e54e49a5 | ||
|
|
6b9ac2700e | ||
|
|
012616a285 | ||
|
|
2669b1bff6 |
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@@ -115,7 +115,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20240620
|
||||
key: gam-${{ matrix.jid }}-20240828
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
@@ -331,7 +331,9 @@ jobs:
|
||||
# install_sw saves us ages processing man pages :-)
|
||||
$MAKE install_sw
|
||||
fi
|
||||
echo "LDFLAGS=-L${OPENSSL_INSTALL_PATH}/lib" >> $GITHUB_ENV
|
||||
if [[ "${RUNNER_OS}" != "Windows" ]]; then
|
||||
echo "LDFLAGS=-L${OPENSSL_INSTALL_PATH}/lib" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1" >> $GITHUB_ENV
|
||||
case $arch in
|
||||
universal2)
|
||||
@@ -361,12 +363,7 @@ jobs:
|
||||
cd "${GITHUB_WORKSPACE}/src"
|
||||
git clone https://github.com/python/cpython.git
|
||||
cd "${PYTHON_SOURCE_PATH}"
|
||||
# Pin Windows to 3.11.6 for the moment
|
||||
# if [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
# export LATEST_STABLE_TAG="v3.11.6"
|
||||
# else
|
||||
export LATEST_STABLE_TAG=$(git tag --list | grep -v a | grep -v rc | grep -v b | sort -Vr | head -n1)
|
||||
# fi
|
||||
git checkout "${LATEST_STABLE_TAG}"
|
||||
export COMPILED_PYTHON_VERSION=${LATEST_STABLE_TAG:1} # Trim the "v" prefix
|
||||
echo "COMPILED_PYTHON_VERSION=${COMPILED_PYTHON_VERSION}" >> $GITHUB_ENV
|
||||
@@ -504,16 +501,8 @@ jobs:
|
||||
git clone https://github.com/pyinstaller/pyinstaller.git
|
||||
cd pyinstaller
|
||||
export latest_release=$(git tag --list | grep -v dev | grep -v rc | sort -Vr | head -n1)
|
||||
#V6.0.0 causes errors on staticx
|
||||
#if [[ "${staticx}" == "yes" ]]; then
|
||||
# git checkout "v5.13.2"
|
||||
#elif [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
# git checkout "v5.13.2"
|
||||
#elif [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||
# git checkout "v5.13.2"
|
||||
#else
|
||||
git checkout "${latest_release}"
|
||||
#fi
|
||||
# git checkout "${latest_release}"
|
||||
git checkout "v6.9.0"
|
||||
# remove pre-compiled bootloaders so we fail if bootloader compile fails
|
||||
rm -rvf PyInstaller/bootloader/*-*/*
|
||||
cd bootloader
|
||||
|
||||
@@ -225,14 +225,14 @@ perform these steps and then you should be able to authorize and use your projec
|
||||
* Click on Grant Access
|
||||
* Enter the new admin address in Principals
|
||||
* Click in the Select a role box
|
||||
* Type orgpolicy.policies.update in the Filter box
|
||||
* Type organization policy administrator in the Filter box
|
||||
* Click Organization Policy Administrator
|
||||
* Click Save
|
||||
* In the upper left click the three lines to the left of Google Cloud and select IAM & Admin
|
||||
* Under IAM & Admin select IAM
|
||||
* Click the down arrow in the box to the right of Google Cloud
|
||||
* Click the three dots at the right and select Manage Resources
|
||||
* Click the three dots and the end of the line for the GAM project just created
|
||||
* Click the three dots at the end of the line for the GAM project just created
|
||||
* Click Settings
|
||||
* Click Organization Policies in the left column
|
||||
* Now you should be at "Policies for Gam Project"
|
||||
|
||||
@@ -193,7 +193,8 @@ Select the fields to be displayed:
|
||||
* `annotated` - Display these fields: deviceId,annotatedAssetId,annotatedLocation,annotatedNotes,annotatedUser
|
||||
* `basic` - Display all fields except: browsers, lastDeviceUsers, lastStatusReportTime, machinePloicies; this is the default
|
||||
* `allfields/full` - Display all fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Displaya selected list of fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Display a selected list of fields
|
||||
* Note that `ou, org and orgunit` are both command line options and field names; use `fields` to include them in the selected list of fields
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values:
|
||||
- `formatjson` - Display the fields in JSON format.
|
||||
@@ -232,7 +233,8 @@ Select the fields to be displayed:
|
||||
* `annotated` - Display these fields: deviceId,annotatedAssetId,annotatedLocation,annotatedNotes,annotatedUser
|
||||
* `basic` - Display all fields except: browsers, lastDeviceUsers, lastStatusReportTime, machinePloicies; this is the default
|
||||
* `allfields/full` - Display all fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Displaya selected list of fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Display a selected list of fields
|
||||
* Note that `ou, org and orgunit` are both command line options and field names; use `fields` to include them in the selected list of fields
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
@@ -199,6 +199,16 @@ gam update chromepolicy convertcrnl chrome.devices.DisabledDeviceReturnInstructi
|
||||
```
|
||||
|
||||
### Examples
|
||||
Restrict use of Chromebooks in an OU to a specific list of users.
|
||||
```
|
||||
gam update chromepolicy chrome.devices.SignInRestriction deviceAllowNewUsers RESTRICTED_LIST userAllowlist "user1@domain.com,user2@domain.com" ou "<Path/To/Ou>"
|
||||
```
|
||||
|
||||
Restrict use of Chromebooks in an OU to users in a specific domain.
|
||||
```
|
||||
gam update chromepolicy chrome.devices.SignInRestriction deviceAllowNewUsers RESTRICTED_LIST userAllowlist "*@domain.com" ou "<Path/To/Ou>"
|
||||
```
|
||||
|
||||
Restrict student users from adding additional printers and set default printing to black and white.
|
||||
```
|
||||
gam update chromepolicy chrome.users.UserPrintersAllowed userPrintersAllowed false chrome.users.DefaultPrintColor printingColorDefault MONOCHROME orgunit "/Students"
|
||||
|
||||
@@ -134,6 +134,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
creationtime|
|
||||
creator|creatoruserid|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -154,6 +155,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
creator|creatoruserid|
|
||||
description|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -179,6 +181,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
duedate|
|
||||
duetime|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
maxpoints|
|
||||
scheduledtime|
|
||||
@@ -187,6 +190,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
title|
|
||||
topicid|
|
||||
updatetime|
|
||||
workid|
|
||||
worktype
|
||||
<CourseWorkFieldNameList> ::= "<CourseWorkFieldName>(,<CourseWorkFieldName>)*"
|
||||
|
||||
@@ -270,11 +274,14 @@ The options `name <String>` and `teacher <UserItem>` are required when creating
|
||||
gam create|add course [id|alias <CourseAlias>] <CourseAttribute>*
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
@@ -285,11 +292,14 @@ gam create|add course [id|alias <CourseAlias>] <CourseAttribute>*
|
||||
gam update course <CourseID> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
@@ -299,11 +309,14 @@ gam update course <CourseID> <CourseAttribute>+
|
||||
gam update courses <CourseEntity> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
@@ -314,15 +327,25 @@ gam update courses <CourseEntity> <CourseAttribute>+
|
||||
`copyfrom <CourseID>` allows copying of course announcements, work, topics and members from one course to another.
|
||||
* Accouncements - By default, no course announcements are copied
|
||||
* `announcementstates <CourseAnnouncementStateList>` - Copy class announcements with the specified states
|
||||
* `individualstudentannouncements copy` - Copy individual student announcements; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentannouncements delete` - Delete individual student announcements
|
||||
* `individualstudentannouncements maptoall` - Map individual student announcements to all student announcements
|
||||
* Materials - By default, no course materials are copied
|
||||
* `materialstates <CourseMaterialsStateList>` - Copy class materials with the specified states
|
||||
* `individualstudentmaterials copy` - Copy individual student materials; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentmaterials delete` - Delete individual student materials
|
||||
* `individualstudentmaterials maptoall` - Map individual student materials to all student materials
|
||||
* Work - By default, no course work is copied
|
||||
* `workstates <CourseWorkStateList>` - Copy class work with the specified states
|
||||
* `individualstudentassignments copy` - Copy individual student assignments; this is the default. You will get an error if the student is not a member of the course.
|
||||
* `individualstudentassignments delete` - Delete individual student assignments
|
||||
* `individualstudentassignments maptoall` - Map individual student assignments to all student assignments
|
||||
* `individualstudentcoursework copy` - Copy individual student coursework; this is the default. You will get an error if the student is not a member of the course
|
||||
* `individualstudentcoursework delete` - Delete individual student coursework
|
||||
* `individualstudentcoursework maptoall` - Map individual student coursework to all student coursework
|
||||
* `removeduedate false` - Remove due dates before the current time; this is the default
|
||||
* `removeduedate|removeduedate true` - Remove all due dates
|
||||
* For convenience, setting `individualstudentassignments` sets all the following to the same value:
|
||||
* `individualstudentannouncements`
|
||||
* `individualstudentmaterials`
|
||||
* `individualstudentcoursework`
|
||||
* Announcements, Materials and Work Materials files
|
||||
* `copymaterialsfiles false` - Copy links to files referenced by materials in the `copyfrom` course; this is the default
|
||||
* `copymaterialsfiles|copymaterialsfiles true` - Copy files referenced by materials in the `copyfrom` course
|
||||
@@ -354,7 +377,7 @@ Drive files with `shareMode` `Each student will get a copy` don't seem to be abl
|
||||
|
||||
## Delete courses
|
||||
Classes can only be deleted when they are in the ARCHIVED state; to delete a class, you can update its state to ARCHIVED
|
||||
and then delete it or you can specify that it be archived as part of the delete command.
|
||||
and then delete it or you can specify that it be archived as parot of the delete command.
|
||||
```
|
||||
gam delete course <CourseID> [archived]
|
||||
gam delete courses <CourseEntity> [archived]
|
||||
@@ -603,7 +626,9 @@ gam print course-work [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(workids <CourseWorkIDEntity>)|(workstates <CourseWorkStateList>)*
|
||||
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
|
||||
[showcreatoremails] [showtopicnames] [fields <CourseWorkFieldNameList>] [formatjson [quotechar <Character>]]
|
||||
[showcreatoremails] [showtopicnames] [fields <CourseWorkFieldNameList>]
|
||||
[showstudentsaslist [<Boolean>]] [delimiter <Character>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
```
|
||||
By default, the `print course-work` command displays course work information for all courses.
|
||||
@@ -625,7 +650,7 @@ To get information about course work created/updated/scheduled within a particul
|
||||
* `end|endtime <Date>|<Time>` - specify the end of the time frame; if not specified, the time frame will be open ended at the end
|
||||
For the filter to apply, `timefilter` and at least one of `start|starttime` and `end|endtime` must be specified.
|
||||
|
||||
By default, all pub`lished course work for a course is displayed; use the following options to select specific course work.
|
||||
By default, all published course work for a course is displayed; use the following options to select specific course work.
|
||||
* `workids <CourseWorkIDEntity>` - Display course work with the IDs specified in `<CourseWorkIDEntity>`.
|
||||
* `workstates <CourseWorkStateList>` - Display course work with any of the specified states.
|
||||
|
||||
@@ -634,6 +659,9 @@ By default, all course work fields are displayed; use the following options to m
|
||||
* `showtopicnames` - Display topic names; requires and additional API call per course.
|
||||
* `fields <CourseWorkFieldNameList>` - Select specific fields to display.
|
||||
|
||||
By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns.
|
||||
Use options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to display the student IDs is a single column as a delimited list.
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
|
||||
@@ -200,12 +200,17 @@ Data fields identified in a `csvkmd` argument.
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_top_files |
|
||||
|
||||
@@ -55,12 +55,17 @@
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_top_files |
|
||||
@@ -78,7 +83,7 @@
|
||||
|
||||
<SharedDriveID> ::= <String>
|
||||
<SharedDriveName> ::= <String>
|
||||
<SharedDriveIDEntity> ::= (teamdriveid <DriveFileItem>) | (teamdriveid:<DriveFileItem>)
|
||||
<SharedDriveIDEntity> ::= (teamdriveid <SharedDriveID>) | (teamdriveid:<SharedDriveID>)
|
||||
<SharedDriveNameEntity> ::= (teamdrive <SharedDriveName>) | (teamdrive:<SharedDriveName>)
|
||||
<SharedDriveFileNameEntity> ::= (teamdrivefilename <DriveFileName>) | (teamdrivefilename:<DriveFileName>)
|
||||
|
||||
@@ -214,7 +219,7 @@ By default, all types of files and folders are displayed; you can specify a list
|
||||
<MimeTypeList> ::= "<MimeType>(,<MimeType>)*"
|
||||
```
|
||||
This is the mapping from `<MimeTypeShortcut>` to MIME type.
|
||||
* `gdoc|gdocument` - 'application/vnd.google-apps.document
|
||||
* `gdoc|gdocument` - application/vnd.google-apps.document
|
||||
* `gdrawing` - application/vnd.google-apps.drawing
|
||||
* `gfile` - application/vnd.google-apps.file
|
||||
* `gfolder|gdirectory` - application/vnd.google-apps.folder
|
||||
@@ -246,30 +251,37 @@ The options combine ownership and broad MIME type selections.
|
||||
```
|
||||
<DriveFileQueryShortcut> ::=
|
||||
all_files | all_folders | all_google_files | all_non_google_files | all_items |
|
||||
my_files | my_folders | my_google_files | my_non_google_files | my_items |
|
||||
my_docs | my_files | my_folders | my_forms | my_google_files | my_non_google_files | my_items |
|
||||
my_presentations | my_publishable_items | my_sheets | my_slides |
|
||||
my_top_files | my_top_folders | my_top_items |
|
||||
others_files | others_folders | others_google_files | others_non_google_files | others_items |
|
||||
writable_files
|
||||
```
|
||||
* all_files - "mimeType != application/vnd.google-apps.folder"
|
||||
* all_folders - "mimeType = application/vnd.google-apps.folder"
|
||||
* all_google_files - "mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* all_files - "mimeType != 'application/vnd.google-apps.folder'"
|
||||
* all_folders - "mimeType = 'application/vnd.google-apps.folder'"
|
||||
* all_google_files - "mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* all_non_google_files - "not mimeType contains 'vnd.google'"
|
||||
* all_items - "" (An empty query specifies all files and folders)
|
||||
* my_files - "'me' in owners and mimeType != application/vnd.google-apps.folder"
|
||||
* my_folders - "'me' in owners and mimeType = application/vnd.google-apps.folder"
|
||||
* my_google_files - "'me' in owners and mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* my_docs - "'me' in owners and mimeType = 'application/vnd.google-apps.document'"
|
||||
* my_files - "'me' in owners and mimeType != 'application/vnd.google-apps.folder'"
|
||||
* my_folders - "'me' in owners and mimeType = 'application/vnd.google-apps.folder'"
|
||||
* my_forms - "'me' in owners and mimeType = 'application/vnd.google-apps.form'"
|
||||
* my_google_files - "'me' in owners and mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* my_non_google_files - "'me' in owners and not mimeType contains 'vnd.google'"
|
||||
* my_presentations - "'me' in owners and mimeType = 'application/vnd.google-apps.presentation'"
|
||||
* my_publishable_items - "'me' in owners and (mimeType = 'application/vnd.google-apps.document' or mimeType = 'application/vnd.google-apps.form' or mimeType = 'application/vnd.google-apps.presentation' or mimeType = 'application/vnd.google-apps.spreadsheet')"
|
||||
* my_sheets - "'me' in owners and mimeType = 'application/vnd.google-apps.spreadsheet'"
|
||||
* my_slides - "'me' in owners and mimeType = 'application/vnd.google-apps.presentation'"
|
||||
* my_items - "'me' in owners"
|
||||
* my_top_files - "'me' in owners and mimeType != application/vnd.google-apps.folder and 'root' in parents"
|
||||
* my_top_folders - "'me' in owners and mimeType = application/vnd.google-apps.folder and 'root' in parents"
|
||||
* my_top_files - "'me' in owners and mimeType != 'application/vnd.google-apps.folder' and 'root' in parents"
|
||||
* my_top_folders - "'me' in owners and mimeType = 'application/vnd.google-apps.folder' and 'root' in parents"
|
||||
* my_top_items - "'me' in owners and 'root' in parents"
|
||||
* others_files - "not 'me' in owners and mimeType != application/vnd.google-apps.folder"
|
||||
* others_folders - "not 'me' in owners and mimeType = application/vnd.google-apps.folder"
|
||||
* others_google_files - "not 'me' in owners and mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* others_files - "not 'me' in owners and mimeType != 'application/vnd.google-apps.folder'"
|
||||
* others_folders - "not 'me' in owners and mimeType = 'application/vnd.google-apps.folder'"
|
||||
* others_google_files - "not 'me' in owners and mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* others_non_google_files - "not 'me' in owners and not mimeType contains 'vnd.google'"
|
||||
* others_items - "not 'me' in owners"
|
||||
* writable_files - "'me' in writers and mimeType != application/vnd.google-apps.folder"
|
||||
* writable_files - "'me' in writers and mimeType != 'application/vnd.google-apps.folder'"
|
||||
|
||||
## Select based on file size
|
||||
For these filters, GAM processes then after the list of files is downloaded. You can combine these
|
||||
@@ -291,7 +303,7 @@ Use [Permission matches](#permission-matches) to limit the display to files with
|
||||
### Examples
|
||||
```
|
||||
gam user testuser show fileinfo query "name='Test File'"
|
||||
gam user testuser show fileinfo query:"name='Test Folder' and mimeType=application/vnd.google-apps.folder"
|
||||
gam user testuser show fileinfo query:"name='Test Folder' and mimeType='application/vnd.google-apps.folder'"
|
||||
gam user testuser print filelist my_non_google_files
|
||||
```
|
||||
## Select root folder
|
||||
@@ -353,9 +365,9 @@ See: [Drive Query](https://developers.google.com/drive/api/v3/search-files)
|
||||
all_files | all_folders | all_google_files | all_non_google_files | all_items
|
||||
```
|
||||
Keyword to query mappings for `<DriveFileQueryShortcut>`:
|
||||
* all_files - "mimeType != application/vnd.google-apps.folder"
|
||||
* all_folders - "mimeType = application/vnd.google-apps.folder"
|
||||
* all_google_files - "mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* all_files - "mimeType != 'application/vnd.google-apps.folder'"
|
||||
* all_folders - "mimeType = 'application/vnd.google-apps.folder'"
|
||||
* all_google_files - "mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* all_non_google_files - "not mimeType contains 'vnd.google'"
|
||||
* all_items - "" (An empty query specifies all files and folders)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
|
||||
## Display File Ownership for Old files
|
||||
If the above commands fail, you can try to loop through all accounts, however this might take a long time if you are on a large Google Workspace Account.
|
||||
|
||||
If any lines are displayed, the file owner is in the `owners.0.emailAddress` column.
|
||||
```
|
||||
gam config auto_batch_min 1 multiprocessexit rc=0 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select id <DriveFileID> fields id,name,owners.emailaddress norecursion showownedby any
|
||||
gam config auto_batch_min 1 multiprocessexit rc=0 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select name <DriveFileName> fields id,name,owners.emailaddress norecursion showownedby any
|
||||
|
||||
@@ -10,6 +10,196 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
|
||||
See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||
|
||||
### 6.80.18
|
||||
|
||||
Updated `gam print|show admins` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
|
||||
### 6.80.17
|
||||
|
||||
Updated `gam <UserTypeEntity> modify messages` to improve error handling.
|
||||
|
||||
### 6.80.16
|
||||
|
||||
Fixed bug in `gam print vaultcounts` that caused a trap.
|
||||
|
||||
### 6.80.15
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print filelist ... countsrowfilter` that caused a trap.
|
||||
|
||||
Added option `continueoninvalidquery [<Boolean>]` to `gam <UserTypeEntity> print filelist|filecounts` that can be used
|
||||
in special cases where a query of the form `query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels"
|
||||
causes Google to issue an error saying that the query is invalid when, in fact, it is but the user does not have a
|
||||
license that suppprts drive file labels. When `continueoninvalidquery` is true, GAM prints an error message and
|
||||
proceeds to the next user rather that terminating as it does now. Of course, if the query really is invalid, you will
|
||||
get the message for every user.
|
||||
|
||||
### 6.80.14
|
||||
|
||||
Updated `gam <UserTypeEntity> print messages|threads` to display all default headers
|
||||
even if no messages are to be displayed. This eliminates error messages of the following form
|
||||
that occurred because only the headers `User,threadId,id` were displayed.
|
||||
```
|
||||
WARNING: csv_output_row_filter column "^Date$" does not match any output columns
|
||||
```
|
||||
|
||||
### 6.80.13
|
||||
|
||||
Added `my_publishable_items` to `<DriveFileQueryShortcut>` that can be used in
|
||||
`gam <UserTypeEntity> print filerevisions` to select only those items that can be
|
||||
published to the web: documents, forms, presentations(slides), spreadsheets. With row filtering,
|
||||
this allows identification of files that have been published outside your domain.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Files-Display#display-files-published-to-the-web
|
||||
|
||||
### 6.80.12
|
||||
|
||||
Updated `gam print vaultcounts` to correctly display accounts with errors.
|
||||
|
||||
### 6.80.11
|
||||
|
||||
Updated `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity> shortcutandtarget`
|
||||
that when `<DriveFileEntity` is a shortcut, to have GAM validate that the shortcut and target can be
|
||||
successfully processed before proceeding.
|
||||
|
||||
### 6.80.10
|
||||
|
||||
Added option `followshortcuts [<Boolean>]` to `gam <UserTypeEntity> print|show fileinfo|filepath <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to display information about the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
Added option `shortcutandtarget [<Boolean>]` to `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
### 6.80.09
|
||||
|
||||
Added options `allschemas|(schemas|custom|customschemas <SchemaNameList>)` to `gam print group-members`
|
||||
that display any custom schema values for the group members.
|
||||
|
||||
### 6.80.08
|
||||
|
||||
Updated `gam print|show oushareddrives` to display the Shared Drive ID, name and orgUnitPath as
|
||||
individual, separate entities in the output.
|
||||
|
||||
### 6.80.07
|
||||
|
||||
Updated `dateheaderformat iso` in `gam <UserTypeEntity> info|print|show messages` to include a colon
|
||||
between the hours and minutes in the timezone portion of the string as in all other time strings.
|
||||
|
||||
### 6.80.06
|
||||
|
||||
Added option `tdreturnidonly [<Boolean>]` to `<ToDriveAttribute>` that when true (the default), causes GAM to display
|
||||
only the uploaded file ID to stdout. This can be captured and used in subsequent commands, `tdfileid <DriveFileID>` that will update the same file.
|
||||
|
||||
### 6.80.05
|
||||
|
||||
Added option `individualstudentcoursework copy|delete|maptoall` to `gam create|update course ... copyfrom`
|
||||
that controls how individual student coursework in the `copyfrom` course is processed.
|
||||
* `individualstudentcoursework copy` - Copy individual student coursework; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentcoursework delete` - Delete individual student coursework
|
||||
* `individualstudentcoursework maptoall` - Map individual student coursework to all student coursework
|
||||
|
||||
For convenience, setting `individualstudentassignments` sets all of the following to the same value:
|
||||
* `individualstudentannouncements`
|
||||
* `individualstudentmaterials`
|
||||
* `individualstudentcoursework`
|
||||
|
||||
### 6.80.04
|
||||
|
||||
Cleaned up progress messages in `gam create|update course ... copyfrom`.
|
||||
|
||||
### 6.80.03
|
||||
|
||||
Added option `stripcrsfromname` to `gam <UserTypeEntity> print driveactivity` that causes carriage returns,
|
||||
linefeeds and nulls to be stripped from file names.
|
||||
|
||||
### 6.80.02
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print filecounts` that adds
|
||||
additional columns of data to the CSV file output.
|
||||
|
||||
Added options `individualstudentannouncements copy|delete|maptoall` and `individualstudentmaterials copy|delete|maptoall`
|
||||
to `gam create|update course ... copyfrom` that controls how individual student announcements and materials in the `copyfrom` course are processed.
|
||||
* `individualstudentannouncements copy` - Copy individual student announcements; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentannouncements delete` - Delete individual student announcements
|
||||
* `individualstudentannouncements maptoall` - Map individual student announcements to all student announcements
|
||||
* `individualstudentmaterials copy` - Copy individual student materials; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentmaterials delete` - Delete individual student materials
|
||||
* `individualstudentmaterials maptoall` - Map individual student materials to all student materials
|
||||
|
||||
### 6.80.01
|
||||
|
||||
Added options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to `gam print course-work`.
|
||||
By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns.
|
||||
Use these options to display the student IDs in a single column as a delimited list.
|
||||
|
||||
Updated `gam <UserTypeEntity> vacation [<Boolean>]` to make `<Boolean>` optional; this allows changes
|
||||
to other fields without affecting the current responder state.
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show vacation` to avoid a trap when invalid start or end dates
|
||||
have been entered in the Gmail user interface. Invalid dates are represented as `1970-01-01`.
|
||||
|
||||
### 6.80.00
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print users ... license ... formatjson` that caused a trap.
|
||||
|
||||
Upgraded to Python 3.12.5 where possible.
|
||||
|
||||
### 6.79.12
|
||||
|
||||
Fixed bug in `gam user admin@domain.com print chatspaces asadmin` that caused the following error:
|
||||
```
|
||||
Chat Admin: admin@domain.com(asadmin), Print Failed: This method doesn't support non-admin user authentication. Authenticate with an admin account.
|
||||
```
|
||||
|
||||
### 6.79.11
|
||||
|
||||
Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied.
|
||||
|
||||
### 6.79.10
|
||||
|
||||
Updated commands to handle a trap that occurs when oauth2service.json specifies a YubiKey but the YubiKey is not inserted.
|
||||
|
||||
### 6.79.09
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print teamdriveacls` that adds
|
||||
additional columns of data to the CSV file output. This can be used when ACLs for selected users are to be
|
||||
replaced with a different user email address.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Shared-Drives#bulk-change-user1-shared-drive-access-to-user2
|
||||
|
||||
### 6.79.08
|
||||
|
||||
Clarified action to perform messages when creating/deleting/updating licenses.
|
||||
|
||||
### 6.79.07
|
||||
|
||||
Added option `totalonly` to `gam <UserTypeEntity> print|show groups` that displays
|
||||
the user email address and the total number of groups to which it belongs. This is in
|
||||
contrast to `countsonly` that has to make an additional API call per group per user to get the user's role.
|
||||
When `countsonly` is specified, an additional column `Total` is displayed that is the sum
|
||||
of the role counts.
|
||||
|
||||
### 6.79.06
|
||||
|
||||
Fixed bug in `gam calendars <CalendarEntity> update event ... removeattendee <EmailAddress>` that caused a trap
|
||||
if the event had no attendees.
|
||||
|
||||
### 6.79.05
|
||||
|
||||
Updated `gam <UserTypeEntity> empty drivetrash <SharedDriveEntity>` to handle this error that
|
||||
occurs when the user is not a Manager of the Shared Drive.
|
||||
```
|
||||
ERROR: 403: insufficientFilePermissions - The user does not have sufficient permissions for this file.
|
||||
```
|
||||
|
||||
### 6.79.04
|
||||
|
||||
Added options `filename <FileName>` and `movetoou <OrgUnitItem>` to `gam check ou <OrgUnitItem>`
|
||||
that causes GAM to create a batch file of GAM commands that will move any remaining items
|
||||
in `ou <OrgUnitItem>` to `movetoou <OrgUnitItem>`; executing the batch file will then allow
|
||||
`ou <OrgUnitItem>` to be deleted if desired.
|
||||
|
||||
### 6.79.03
|
||||
|
||||
Added column|field `assignedToUnknown` to `gam print|show admins` that will be True when
|
||||
@@ -4946,7 +5136,7 @@ converting `<SMTPDateHeader>` values to the `gam.cfg timezone`.
|
||||
|
||||
Updated option `dateheaderformat iso|rfc2822|<String>` to `gam <UserTypeEntity> print|show messages|threads` that allows
|
||||
reformatting of the message `Date` header value from RFC2822 format to the the following:
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%z`
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%:z`
|
||||
* `rfc2822` - Format is `%a, %d %b %Y %H:%M:%S %z`
|
||||
* `<String>` - Format according to: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
|
||||
|
||||
|
||||
@@ -597,6 +597,7 @@ gam print group-members [todrive <ToDriveAttribute>*]
|
||||
[types <GroupTypeList>]
|
||||
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
|
||||
[userfields <UserFieldNameList>]
|
||||
[allschemas|(schemas|custom|customschemas <SchemaNameList>)]
|
||||
[(recursive [noduplicates])|includederivedmembership] [nogroupemail]
|
||||
[peoplelookup|(peoplelookupuser <EmailAddress>)]
|
||||
[unknownname <String>] [cachememberinfo [Boolean]]
|
||||
@@ -661,7 +662,10 @@ these options specify which fields to display:
|
||||
* `<MembersFieldName>*` - Individual field names
|
||||
* `fields <MembersFieldNameList>` - A comma separated list of field names
|
||||
* `delivery|deliverysettings` - Specify this field to get delivery information; an additional API call per member is required
|
||||
* `userfields <UserFieldNameList>` - For members that are users, display these user fields; an additional API call per member is required
|
||||
|
||||
For members that are users, you can specify additional information to display; an additional API call per member is required
|
||||
* `userfields <UserFieldNameList>` - Display specific user fields
|
||||
* `allschemas|(schemas|custom|customschemas <SchemaNameList>)` - Display all or specific custom schema values
|
||||
|
||||
The additional API calls can be reduced with the `cachememberinfo` option; a single API call is made for each user/group
|
||||
and the data is cached to eliminate to need to repeat the API call; this consumes more memory but dramatically reduces the number of API calls.
|
||||
|
||||
@@ -584,7 +584,7 @@ gam print grouptree <GroupEntity> [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
By default, the group parent emails and names are displayed in multiple indexed columns.
|
||||
Use options `showparentsaslist [<Boolean>]` and `delimiter <Character>` to display
|
||||
the group parent emails and names in two columns as delimited lists .
|
||||
the group parent emails and names in two columns as delimited lists.
|
||||
|
||||
#### Examples
|
||||
```
|
||||
|
||||
@@ -251,9 +251,9 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin$ gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.79.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.80.18 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.4 64-bit final
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -923,9 +923,9 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\>del C:\GAMConfig\oauth2.txt
|
||||
C:\>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.79.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.80.18 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.4 64-bit final
|
||||
Python 3.12.5 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
Path: C:\GAMADV-XTD3
|
||||
Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
41
docs/List.md
41
docs/List.md
@@ -1,6 +1,6 @@
|
||||
# List
|
||||
|
||||
The list command is used to verify collections of objects. See GamDataSelection.txt/
|
||||
The list command is used to verify collections of objects.
|
||||
|
||||
## Commands
|
||||
```
|
||||
@@ -8,3 +8,42 @@ gam list [todrive <ToDriveAttribute>*] <EntityList> [data <CrOSTypeEntity>|<User
|
||||
gam <CrOSTypeEntity>|<UserTypeEntity> list [todrive <ToDriveAttribute>*] [data <EntityList> [delimiter <Character>]]
|
||||
```
|
||||
|
||||
Allow mapping of keyfield value in csvkmd selectors.
|
||||
<CSVkmdSelector> ::= csvkmd <FileName> [charset <Charset>]
|
||||
keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <String>]
|
||||
(matchfield <FieldName> <RegularExpression>)*
|
||||
[datafield <FieldName>(:<FieldName)* [delimiter <String>]]
|
||||
|
||||
You want to update the membership of a collection of parent groups at your school, the data is coming from a database in a fixed format.
|
||||
Example 1, CSV File GroupP1P2.csv, exactly the data you want, keypattern and keyvalue are not required
|
||||
Group,P1Email,P2Email
|
||||
2017-parents@domain.com,g1member11@domain.com,g1member12@domain.com
|
||||
2017-parents@domain.com,g1member21@domain.com,g1member22@domain.com
|
||||
2018-parents@domain.com,g2member11@domain.com,g2member11@domain.com
|
||||
2018-parents@domain.com,g2member21@domain.com,g2member22@domain.com
|
||||
...
|
||||
For each row, the value from the Group column is used as the group name.
|
||||
Verify data selection: gam list csvkmd GroupP1P2.csv keyfield Group datafield P1Email:P2Email data csvdata P1Email:P2Email
|
||||
Execute: gam update groups csvkmd GroupP1P2.csv keyfield Group datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
||||
|
||||
Example 2, CSV File GradYearP1P2.csv, you have to convert GradYear to group name GradYear-parents@domain.com, keyvalue is required
|
||||
GradYear,P1Email,P2Email
|
||||
2017,g1member11@domain.com,g1member12@domain.com
|
||||
2017,g1member21@domain.com,g1member22@domain.com
|
||||
2018,g2member11@domain.com,g2member11@domain.com
|
||||
2018,g2member21@domain.com,g2member22@domain.com
|
||||
...
|
||||
For each row, the value from the GradYear column replaces the keyField name in the keyvalue argument and that value is used as the group name.
|
||||
Verify data selection: gam list csvkmd GradYearP1P2.csv keyfield GradYear keyvalue GradYear-parents@domain.com datafield P1Email:P2Email data csvdata P1Email:P2Email
|
||||
Execute: gam update groups csvkmd GradYearP1P2.csv keyfield GradYear keyvalue GradYear-parents@domain.com datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
||||
|
||||
Example 3, CSV File GradYearP1P2.csv, you have to convert GradYear to group name 'LastTwoDigitsOfGradYear-parents@domain.com', keypattern and keyvalue are required.
|
||||
GradYear,P1Email,P2Email
|
||||
2017,g1member11@domain.com,g1member12@domain.com
|
||||
2017,g1member21@domain.com,g1member22@domain.com
|
||||
2018,g2member11@domain.com,g2member11@domain.com
|
||||
2018,g2member21@domain.com,g2member22@domain.com
|
||||
...
|
||||
For each row, the value from the GradYear column is matched against the keypattern, the matched segments are substituted into the keyvalue argument and that value is used as the group name.
|
||||
Verify data selection: gam list csvkmd GradYearP1P2.csv keyfield GradYear keypattern '20(..)' keyvalue '\1-parents@domain.com' datafield P1Email:P2Email data csvdata P1Email:P2Email
|
||||
Execute: gam update groups csvkmd GradYearP1P2.csv keyfield GradYear keypattern '20(..)' keyvalue '\1-parents@domain.com' datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
||||
|
||||
@@ -295,6 +295,7 @@ Only items directly within the OU are counted, items in sub-OUs are not counted.
|
||||
|
||||
gam check org|ou <OrgUnitItem> [todrive <ToDriveAttribute>*]
|
||||
[<OrgUnitCheckName>*|(fields <OrgUnitCheckNameList>)]
|
||||
[filename <FileName>] [movetoou <OrgUnitItem>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, GAM checks each of the five items; you can select specfic fields
|
||||
@@ -309,6 +310,17 @@ When using the `formatjson` option, double quotes are used extensively in the da
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
If `movetoou <OrgUnitItem>` is specified, GAM will create a batch file of GAM commands that will move any remaining items
|
||||
in `ou <OrgUnitItem>` to `movetoou <OrgUnitItem>`.
|
||||
|
||||
By default, the batch file will be named `CleanOuBatch.txt` and will be created in `gam.cfg/drive_dir`.
|
||||
This can be overridden with `filename <FileName>`.
|
||||
|
||||
You can inspect the file and execute it if desired; substitute actual filenames as desired.
|
||||
```
|
||||
gam redirect stdout CleanOuLog.txt multiproces redirect stderr stdout batch CleanOuBatch.txt
|
||||
```
|
||||
|
||||
## Special case handling for large number of organizational units
|
||||
|
||||
By default, the `print orgs` and `show orgtree` commands issue a single API call to get the
|
||||
|
||||
@@ -15,24 +15,38 @@ GAMADV-XTD3 version 6.50.00 or higher is required.
|
||||
## Setup Steps
|
||||
1. Create a [GCP project](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
|
||||
|
||||
2. Create [a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) which will be used by GAMADV-XTD3. Continue steps 2 and 3 without granting the new service account any special access to the project and without granting users access to the service account.
|
||||
2. Create [a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) which will be used by GAMADV-XTD3.
|
||||
* Enter a value in `Service account name`
|
||||
* Enter text in `Service account description`
|
||||
* Click `Create` and `Continue`
|
||||
* Click `Continue` under `Grant this service account access to project`
|
||||
* Click `Done` under `Grant users access to this service account`
|
||||
|
||||
3. Grant the service account rights to generate authentication tokens.
|
||||
* go to [console.cloud.google.com](https://console.cloud.google.com).
|
||||
* go to "IAM & Admin" > Service accounts
|
||||
* click on the service account you created (not the default service account).
|
||||
* copy the email address of your service account to the clipboard.
|
||||
* click on the Permissions tab.
|
||||
* click "Grant Access".
|
||||
* In the "New principals text box, paste the service account email you copied.
|
||||
* Give your service account the "Service Account Key Admin", "Service Account Token Creator" and "View Service Accounts" roles.
|
||||
* Go to [console.cloud.google.com](https://console.cloud.google.com).
|
||||
* Go to `IAM & Admin` > `Service accounts`
|
||||
* Click on the service account you created (not the default service account).
|
||||
* Copy the email address of your service account to the clipboard.
|
||||
* Click on the `Permissions` tab.
|
||||
* Click `Grant Access`.
|
||||
* In the `New principals` text box, paste the service account email you copied.
|
||||
* Give your service account the `Service Account Token Creator` and `View Service Accounts` roles.
|
||||
* Click `Save`
|
||||
|
||||
4. [Create a Windows or Linux virtual machine](https://cloud.google.com/compute/docs/instances/create-start-instance).
|
||||
4. [Create a Windows or Linux virtual machine](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances).
|
||||
* Scroll down and start at Create a VM and attach the service account
|
||||
* Click `Go to VM instances`
|
||||
* Click `Create Instance`
|
||||
* Enter a value for `Name`
|
||||
* Configure `Manage Tags and Labels`
|
||||
* You can choose a region physically close to you though you may be limited in your choices if you want to use the free tier.
|
||||
* GAMADV-XTD3 can run on the minimal `e2-micro` [free tier VM](https://cloud.google.com/free/docs/free-cloud-features#compute) though performance may suffer. If you are performing batch operations, raising the CPU count will help performance. If you have a very large and busy Workspace instance downloading reports or Drive file lists may require more RAM.
|
||||
* [DO NOT use the default service account](https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose). Choose the service account you created above instead.
|
||||
* Set `Service account` under `Identity and API access/API and identity management`; choose the service account you created above.
|
||||
* Select `Set access for each API`
|
||||
* Enable `Cloud Platform`
|
||||
* GAMADV-XTD3 does not use a significant amount of storage, unless you have specific storage needs the default disk size should suffice.
|
||||
* leave other VM instance settings at their defaults unless you know what you are doing.
|
||||
* Leave other VM instance settings at their defaults unless you know what you are doing.
|
||||
* Click `Create`
|
||||
|
||||
5. Install GAMADV-XTD3 on the VM
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/How-to-Install-Advanced-GAM
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
- [Change Shared Drive visibility](#change-shared-drive-visibility)
|
||||
- [Display Shared Drives](#display-shared-drives)
|
||||
- [Display List of Shared Drives in an Organizational Unit](#display-list-of-shared-drives-in-an-organizational-unit)
|
||||
- [Display all Shared Drives with a specific organizer](#display-all-shared-drives-with-a-specific-organizer)
|
||||
- [Display all Shared Drives without a specific organizer](#display-all-shared-drives-without-a-specific-organizer)
|
||||
- [Manage Shared Drive access](#manage-shared-drive-access)
|
||||
- [Transfer Shared Drive access](#transfer-shared-drive-access)
|
||||
- [Display Shared Drive access](#display-shared-drive-access)
|
||||
@@ -72,6 +74,22 @@
|
||||
<OrgUnitPath> ::= /|(/<String>)+
|
||||
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
|
||||
<DriveFileACLRole> ::=
|
||||
manager|organizer|owner|
|
||||
contentmanager|fileorganizer|
|
||||
@@ -380,6 +398,18 @@ Print information about Shared Drives that have admin@domain.com as a member.
|
||||
```
|
||||
gam user admin@domain.com print teamdrives
|
||||
```
|
||||
## Display all Shared Drives with a specific organizer
|
||||
Substitute actual email address for `organizer@domain.com`.
|
||||
```
|
||||
gam config csv_output_header_filter "id,name" print teamdriveacls pm emailaddress organizer@domain.com role organizer em pma process pmselect
|
||||
```
|
||||
|
||||
## Display all Shared Drives without a specific organizer
|
||||
Substitute actual email address for `organizer@domain.com`.
|
||||
```
|
||||
gam config csv_output_header_filter "id,name" print teamdriveacls pm emailaddress organizer@domain.com role organizer em pma skip pmselect
|
||||
```
|
||||
|
||||
## Display List of Shared Drives in an Organizational Unit
|
||||
To use this command you must add the `Cloud Identity API` to your project and authorize
|
||||
the appropriate scope: `Cloud Identity OrgUnits API`.
|
||||
@@ -411,6 +441,11 @@ When using the `formatjson` option, double quotes are used extensively in the da
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
### Get clean, simple output
|
||||
```
|
||||
gam config csv_output_header_filter "driveId,driveName,orgUnitPath" print oushareddrives [ou <OrgUnitPath>]
|
||||
```
|
||||
|
||||
## Manage Shared Drive access
|
||||
These commands are used to manage the ACLs on Shared Drives themselves, not the files/folders on the Shared Drives.
|
||||
|
||||
@@ -580,10 +615,12 @@ Print ACLs for all Shared Drives in the organization created after November 1, 2
|
||||
```
|
||||
gam print teamdriveacls teamdriveadminquery "createdTime > '2017-11-01T00:00:00'"
|
||||
```
|
||||
|
||||
Print ACLs for all Shared Drives in the organization with foo@bar.com as an organizer.
|
||||
```
|
||||
gam print teamdriveacls user foo@bar.com role organizer
|
||||
```
|
||||
|
||||
Print ACLs for all Shared Drives in the organization with foo@bar.com or groups that contain foo@bar.com as a reader.
|
||||
```
|
||||
gam print teamdriveacls user foo@bar.com role reader checkgroups
|
||||
|
||||
@@ -191,6 +191,7 @@ direct the uploaded file to a particular user and location and add a timestamp t
|
||||
(tdnotify [<Boolean>])|
|
||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||
(tdretaintitle [<Boolean>])|
|
||||
(tdreturnidonly [<Boolean>])|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
@@ -238,6 +239,11 @@ If `tdfileid <DriveFileID>` is not specified, a new file is created.
|
||||
* `tdcellwrap clip|overflow|wrap` - The Spreadsheet cell wrapping strategy.
|
||||
* `tdcellnumberformat text|number` - The Spreadsheet number format.
|
||||
|
||||
## Report action, capture file ID
|
||||
* `tdreturnidonly` - If False, a message is written to stdout with the uploaded file URL; if True, only the uploaded file ID is written to stdout
|
||||
|
||||
The ID can be captured and used in subsequent commands, `tdfileid <DriveFileID>` that will update the same file.
|
||||
|
||||
## Open browser and send email
|
||||
* `tdnobrowser` - If False, a browser is opened to view the file uploaded to Google Drive; if not specified, the `todrive_nobrowser` value from gam.cfg is used. If True, no browser is opened.
|
||||
* `tdnoemail` - If False, an email is sent to `tduser` informing them of name and URL of the uploaded file; if not specified, the `todrive_noemail` value from gam.cfg is used. If True, no email is sent to `tduser`.
|
||||
|
||||
@@ -461,6 +461,7 @@ and must have the specified values.
|
||||
* `matchfield location <RegularExpression>` - The location must match `<RegularExpression>`
|
||||
* `matchfield organizeremail <RegularExpression>` - The organizer email address must match `<RegularExpression>`
|
||||
* `matchfield organizername <RegularExpression>` - The orgainzer name must match `<RegularExpression>`
|
||||
* `matchfield organizerself <Boolean>` - The user must be/not be the organizer of the event
|
||||
* `matchfield status <RegularExpression>` - The summary must match `<RegularExpression>`. The API documented values are:
|
||||
* `confirmed`
|
||||
* `tentative`
|
||||
|
||||
@@ -70,7 +70,7 @@ Google has introduced Drive Activity API v2; it adds time and action filtering a
|
||||
Drive Activity API v1 has been deprecated.
|
||||
* https://developers.google.com/drive/activity/v2/migrating
|
||||
```
|
||||
gam <UserTypeEntity> print|show driveactivity [v2] [todrive <ToDriveAttributes>*]
|
||||
gam <UserTypeEntity> print driveactivity [v2] [todrive <ToDriveAttributes>*]
|
||||
[(fileid <DriveFileID>)|(folderid <DriveFolderID>)|
|
||||
(drivefilename <DriveFileName>)|(drivefoldername <DriveFolderName>)|
|
||||
(query <QueryDriveFile>)]
|
||||
@@ -79,7 +79,7 @@ gam <UserTypeEntity> print|show driveactivity [v2] [todrive <ToDriveAttributes>*
|
||||
[action|actions [not] <DriveActivityActionList>]
|
||||
[consolidationstrategy legacy|none]
|
||||
[idmapfile <FileName>|(gsheet <UserGoogleSheet>) [charset <String>] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[stripcrsfromname] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Drive Activity API v2 is used; the `v2` option is ignored.
|
||||
|
||||
@@ -128,6 +128,9 @@ must be present in the file; the column `name.fullName` will be used if present.
|
||||
|
||||
If you don't use the `idmapfile` option, Gam makes an additional API call per user to get the name and email address.
|
||||
|
||||
The `stripcrsfromname` option strips nulls, carriage returns and linefeeds from drive file names.
|
||||
Use this option if you discover filenames containing these special characters; it is not common.
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
- [File selection with or without a particular drive label](#file-selection-with-or-without-a-particular-drive-label)
|
||||
- [Handle empty file lists](#handle-empty-file-lists)
|
||||
- [Display disk usage](#display-disk-usage)
|
||||
- [Display files published to the web](#display-files-published-to-the-web)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/drive/api/v3/reference/files
|
||||
@@ -55,6 +56,16 @@
|
||||
never|
|
||||
now|today
|
||||
|
||||
<SharedDriveID> ::= <String>
|
||||
<SharedDriveName> ::= <String>
|
||||
<SharedDriveIDEntity> ::= (teamdriveid <SharedDriveID>) | (teamdriveid:<SharedDriveID>)
|
||||
<SharedDriveNameEntity> ::= (teamdrive <SharedDriveName>) | (teamdrive:<SharedDriveName>)
|
||||
<SharedDriveFileNameEntity> ::= (teamdrivefilename <DriveFileName>) | (teamdrivefilename:<DriveFileName>)
|
||||
|
||||
<SharedDriveEntity> ::=
|
||||
<SharedDriveIDEntity> |
|
||||
<SharedDriveNameEntity>
|
||||
|
||||
<MimeTypeShortcut> ::=
|
||||
gdoc|gdocument|
|
||||
gdrawing|
|
||||
@@ -401,7 +412,7 @@ gam <UserTypeEntity> show fileinfo <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
@@ -411,7 +422,7 @@ gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
```
|
||||
@@ -475,6 +486,9 @@ gam user user@domain.com show fileinfo <DriveFileEntity> fields id,name,mimetype
|
||||
The `stripcrsfromname` option strips nulls, carriage returns and linefeeds from drive file names.
|
||||
Use this option if you discover filenames containing these special characters; it is not common.
|
||||
|
||||
Starting in version 6.80.10, the option `followshortcuts [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to display information about the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
@@ -485,10 +499,12 @@ gam <UserTypeEntity> show filepath <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname]
|
||||
[folderpathonly [<Boolean>]] [fullpath] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
gam <UserTypeEntity> print filepath <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname] [oneitemperrow]
|
||||
[fullpath] [folderpathonly [<Boolean>]] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
```
|
||||
Use `returnpathonly` to display just the file path of the files in `<DriveFileEntity>`.
|
||||
|
||||
@@ -506,6 +522,9 @@ Use this option if you discover filenames containing these special characters; i
|
||||
By default, when printing file paths, all paths for a file are displayed on the same row; use `oneitemperrow` to
|
||||
have each file path displayed on a separate row.
|
||||
|
||||
Starting in version 6.80.10, the option `followshortcuts [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to display path information for the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
## Select files for Display file counts, list, tree
|
||||
Most GAM commands that deal with files require a `<DriveFileEntity>` to be specified; the command
|
||||
then processes those files. The `filecounts`, `filelist` and `filetree` commands don't process files, they just list them.
|
||||
@@ -531,15 +550,19 @@ See: [Drive File Selection](Drive-File-Selection) for details of `<DriveFileName
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_forms |
|
||||
my_top_files |
|
||||
my_top_folders |
|
||||
my_top_items |
|
||||
@@ -661,6 +684,7 @@ Print or show file counts by MIME type and/or file name.
|
||||
gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
@@ -669,11 +693,12 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize]
|
||||
[showsize] [showmimetypesize] (addcsvdata <FieldName> <String>)*
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
gam <UserTypeEntity> show filecounts
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
@@ -688,10 +713,19 @@ gam <UserTypeEntity> show filecounts
|
||||
|
||||
By default, print filecounts displays counts of all files owned by the specified [`<UserTypeEntity>`](Collections-of-Users).
|
||||
|
||||
The option `continueoninvalidquery [<Boolean>] can be used in special cases where a query of the form
|
||||
`query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels" causes Google to issue an error
|
||||
saying that the query is invalid when, in fact, it is but the user does not have a license that suppprts drive file labels.
|
||||
When `continueoninvalidquery` is true, GAM prints an error message and proceeds to the next user rather that terminating
|
||||
as it does now. Of course, if the query really is invalid, you will get the message for every user.
|
||||
|
||||
The `showsize` option displays the total size (in bytes) of the files counted.
|
||||
|
||||
The showmimetypesize' displays the total size (in bytes) of each MIME type counted.
|
||||
|
||||
For print filecouts, add additional columns of data from the command line to the output:
|
||||
* `addcsvdata <FieldName> <String>` - Add additional columns of data from the command line to the output
|
||||
|
||||
See [Select files for Display file counts, list, tree](#select-files-for-display-file-counts-list-tree)
|
||||
|
||||
Use the `excludetrashed` option to suppress counting files in the trash.
|
||||
@@ -1009,6 +1043,7 @@ Display a list of file/folder details in CSV format.
|
||||
gam <UserTypeEntity> print|show filelist [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[choose <DriveFileNameEntity>|<DriveFileEntityShortcut>]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
@@ -1035,6 +1070,12 @@ gam <UserTypeEntity> print|show filelist [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
By default, `print filelist` displays all files owned by the specified [`<UserTypeEntity>`](https://github.com/taers232c/GAMADV-XTD3/wiki/Collections-of-Users)
|
||||
|
||||
The option `continueoninvalidquery [<Boolean>] can be used in special cases where a query of the form
|
||||
`query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels" causes Google to issue an error
|
||||
saying that the query is invalid when, in fact, it is but the user does not have a license that suppprts drive file labels.
|
||||
When `continueoninvalidquery` is true, GAM prints an error message and proceeds to the next user rather that terminating
|
||||
as it does now. Of course, if the query really is invalid, you will get the message for every user.
|
||||
|
||||
When `allfields` is specified (or no fields are specified), use `showshareddrivepermissions` to display permissions
|
||||
when shared drives are queried/selected. In this case, the Drive API returns the permission IDs
|
||||
but not the permissions themselves so GAM makes an additional API call per file to get the permissions.
|
||||
@@ -1620,40 +1661,67 @@ Use the `show` option to control the display of data:
|
||||
|
||||
### Examples
|
||||
```
|
||||
$ gam redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage mydrive
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ gam redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage mydrive
|
||||
User: user@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,0,My Drive/Classroom
|
||||
testsimple@domain.com,testsimple@domain.com,0B3YenC8f12ALfmRuX3I4WFlqaTRnMGhXNkVvWV9UUG1zRDQwY1BwVkJhUGx5WHVIcjJKZUU,TestUpdate,True,False,False,2,3420,0,2,3420,0,1,My Drive/Classroom/TestUpdate
|
||||
testsimple@domain.com,testsimple@domain.com,1MT5xJ897oYa0Q2OuzBDfLHvig6k_b0EKaovVA2imGYcnrmqZu5hjlJkEPMH-rHKj4qDyy9_j,TS Course,True,False,False,0,0,0,0,0,0,1,My Drive/Classroom/TS Course
|
||||
testsimple@domain.com,testsimple@domain.com,1gsbqsbhhwBx9hCF0sqtE213tpUn6Ebj2klLFhHb4xkzBKIdEFkvvwCVtZpYWPgOA796fIPEN,TS Course 2,True,False,False,0,0,0,0,0,0,1,My Drive/Classroom/TS Course 2
|
||||
user@domain.com,user@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
user@domain.com,user@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,0,My Drive/Classroom
|
||||
user@domain.com,user@domain.com,0B3YenC8f12ALfmRuX3I4WFlqaTRnMGhXNkVvWV9UUG1zRDQwY1BwVkJhUGx5WHVIcjJKZUU,TestUpdate,True,False,False,2,3420,0,2,3420,0,1,My Drive/Classroom/TestUpdate
|
||||
user@domain.com,user@domain.com,1MT5xJ897oYa0Q2OuzBDfLHvig6k_b0EKaovVA2imGYcnrmqZu5hjlJkEPMH-rHKj4qDyy9_j,TS Course,True,False,False,0,0,0,0,0,0,1,My Drive/Classroom/TS Course
|
||||
user@domain.com,user@domain.com,1gsbqsbhhwBx9hCF0sqtE213tpUn6Ebj2klLFhHb4xkzBKIdEFkvvwCVtZpYWPgOA796fIPEN,TS Course 2,True,False,False,0,0,0,0,0,0,1,My Drive/Classroom/TS Course 2
|
||||
...
|
||||
testsimple@domain.com,testsimple@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
user@domain.com,user@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
user@domain.com,user@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
|
||||
$ gam config csv_output_row_filter "depth:count<1" redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage mydrive
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ gam config csv_output_row_filter "depth:count<1" redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage mydrive
|
||||
User: user@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,0,My Drive/Classroom
|
||||
user@domain.com,user@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
user@domain.com,user@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,0,My Drive/Classroom
|
||||
...
|
||||
testsimple@domain.com,testsimple@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
user@domain.com,user@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
user@domain.com,user@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
|
||||
$ gam redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage mydrive show summaryandtrash
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ gam redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage mydrive show summaryandtrash
|
||||
User: user@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
user@domain.com,user@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
user@domain.com,user@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
|
||||
$ gam redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage shareddriveid 0AL5LiIe4dqxZUk9PVA show summaryandtrash
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ gam redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage shareddriveid 0AL5LiIe4dqxZUk9PVA show summaryandtrash
|
||||
User: user@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,id,name,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,0125LiIe4dqxZUk9PVA,TS Shared Drive 1,False,False,16,6144,7,42,73799,25,-1,SharedDrives/TS Shared Drive 1
|
||||
testsimple@domain.com,Trash,Trash,True,True,1,1024,0,1,1024,0,-1,Trash
|
||||
user@domain.com,0125LiIe4dqxZUk9PVA,TS Shared Drive 1,False,False,16,6144,7,42,73799,25,-1,SharedDrives/TS Shared Drive 1
|
||||
user@domain.com,Trash,Trash,True,True,1,1024,0,1,1024,0,-1,Trash
|
||||
```
|
||||
|
||||
## Display files published to the web
|
||||
Ths requires version 6.80.13 or later.
|
||||
|
||||
You can display files published to the web.
|
||||
```
|
||||
# Get the published files
|
||||
gam config csv_output_header_filter "Owner,id,revisions.0.published,revisions.0.publishedOutsideDomain" csv_output_row_filter "revisions.0.published:boolean:true" auto_batch_min 1 num_threads 20 redirect csv ./PublishedDocs.csv multiprocess redirect stderr - multiprocess <UserTypeEntity> print filerevisions my_publishable_items select last 1
|
||||
# Get the files name, MIMEtype and path
|
||||
gam redirect csv ./PublishedDocsWithName.csv multiprocess redirect stderr - multiprocess csv ./PublishedDocs.csv gam user "~Owner" print filelist select "~id" fields id,name,mimetype fullpath addcsvdata published "~revisions.0.published" addcsvdata publishedOutsideDomain "~revisions.0.publishedOutsideDomain"
|
||||
```
|
||||
|
||||
You can display files published to the web internally for your domain only.
|
||||
```
|
||||
# Get the internally only published files
|
||||
gam config csv_output_header_filter "Owner,id,revisions.0.published,revisions.0.publishedOutsideDomain" csv_output_row_filter "revisions.0.published:boolean:true,revisions.0.publishedOutsideDomain:boolean:false" auto_batch_min 1 num_threads 20 redirect csv ./PublishedDocs.csv multiprocess redirect stderr - multiprocess <UserTypeEntity> print filerevisions my_publishable_items select last 1
|
||||
# Get the files name, MIMEtype and path
|
||||
gam redirect csv ./PublishedDocsWithName.csv multiprocess redirect stderr - multiprocess csv ./PublishedDocs.csv gam user "~Owner" print filelist select "~id" fields id,name,mimetype fullpath addcsvdata published "~revisions.0.published" addcsvdata publishedOutsideDomain "~revisions.0.publishedOutsideDomain"
|
||||
```
|
||||
|
||||
You can display files published to the web externally outside of your domain.
|
||||
```
|
||||
# Get the externally published files
|
||||
gam config csv_output_header_filter "Owner,id,revisions.0.published,revisions.0.publishedOutsideDomain" csv_output_row_filter "revisions.0.published:boolean:true,revisions.0.publishedOutsideDomain:boolean:true" auto_batch_min 1 num_threads 20 redirect csv ./PublishedDocs.csv multiprocess redirect stderr - multiprocess <UserTypeEntity> print filerevisions my_publishable_items select last 1
|
||||
# Get the files name, MIMEtype and path
|
||||
gam redirect csv ./PublishedDocsWithName.csv multiprocess redirect stderr - multiprocess csv ./PublishedDocs.csv gam user "~Owner" print filelist select "~id" fields id,name,mimetype fullpath addcsvdata published "~revisions.0.published" addcsvdata publishedOutsideDomain "~revisions.0.publishedOutsideDomain"
|
||||
```
|
||||
|
||||
@@ -635,24 +635,33 @@ gam user user@domain.com get drivefile drivefilename UserSheet csvsheet NewUsers
|
||||
## Trash files
|
||||
Move a file or folder to the trash. If a folder is moved to the trash, all of its child files and folders are moved to the trash.
|
||||
```
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> trash
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> trash [shortcutandtarget [<Boolean>]]
|
||||
```
|
||||
|
||||
Starting in version 6.80.10, the option `shortcutandtarget [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
## Untrash files
|
||||
Remove a file or folder from the trash. If a folder is removed from the trash, all of its child files and folders are removed from the trash.
|
||||
```
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> untrash
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> untrash [shortcutandtarget [<Boolean>]]
|
||||
```
|
||||
|
||||
Starting in version 6.80.10, the option `shortcutandtarget [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
## Purge files
|
||||
Purging a file permanently deletes it; it can not be recovered. If a folder is purged, all of its child files and folders are purged.
|
||||
```
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> purge
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> purge [shortcutandtarget [<Boolean>]]
|
||||
```
|
||||
|
||||
Starting in version 6.80.10, the option `shortcutandtarget [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
## Download Google Documents as JSON
|
||||
```
|
||||
gam <UserTypeEntity> get document <DriveFileEntity>
|
||||
|
||||
@@ -63,6 +63,10 @@ gam <UserTypeEntity> transfer ownership <DriveFileEntity> <UserItem>
|
||||
(orderby <DriveOrderByFieldName> [ascending|descending])*
|
||||
[preview] [filepath] [pathdelimiter <Character>] [buildtree] [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
`<DriveFileEntity>` specifies a file/folder owned by the source user `<UserTypeEntity>`.
|
||||
|
||||
The target user is specified by `<UserItem>`.
|
||||
|
||||
By default, there is no change of parents for the transferred files/folders, they remain in their current location.
|
||||
* `<DriveFileParentAttribute>` - Specify a parent folder in the My Drive of the target user `<UserItem>`.
|
||||
|
||||
|
||||
@@ -25,6 +25,22 @@
|
||||
<UniqueID> ::= id:<String>
|
||||
<UserItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
|
||||
<DrivePermissionsFieldName> ::=
|
||||
additionalroles|
|
||||
allowfilediscovery|
|
||||
|
||||
@@ -19,6 +19,22 @@
|
||||
<EmailAddress> ::= <String>@<DomainName>
|
||||
<UniqueID> ::= id:<String>
|
||||
<UserItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
```
|
||||
## GAM Data Transfers
|
||||
```
|
||||
|
||||
@@ -440,7 +440,7 @@ gam <UserTypeEntity> delete messages|threads
|
||||
gam <UserTypeEntity> modify messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
|
||||
(addlabel <LabelName>)* (removelabel <LabelName>)*
|
||||
((addlabel <LabelName>)|(removelabel <LabelName>))+
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> spam messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
@@ -583,7 +583,7 @@ By default, the Message ID and these SMTP headers are displayed: `Date, Subject,
|
||||
Use these options to customize the display.
|
||||
|
||||
By default, the `<SMTPDateHeader>` values are displayed in RFC2822 format; the `dateheaderformat iso|rfc2822|<String>` option allows reformatting it:
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%z`
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%:z`
|
||||
* `rfc2822` - Format is `%a, %d %b %Y %H:%M:%S %z`
|
||||
* `<String>` - Format according to: https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
|
||||
If the `Date` header value can't be parsed as RFC2822, it is left unchanged.
|
||||
|
||||
@@ -210,11 +210,13 @@ gam config csv_output_row_filter "signature:boolean:false"
|
||||
|
||||
## Manage vacation
|
||||
```
|
||||
gam <UserTypeEntity> vacation <Boolean> subject <String>
|
||||
gam <UserTypeEntity> vacation [<Boolean>] [subject <String>]
|
||||
[<VacationMessageContent> (replace <Tag> <UserReplacement>)*]
|
||||
[html [<Boolean>]] [contactsonly [<Boolean>]] [domainonly [<Boolean>]]
|
||||
[start|startdate <Date>|Started] [end|enddate <Date>|NotSpecified]
|
||||
```
|
||||
The initial `<Boolean>` can be omitted to allow updates to other fields without affecting the current responder state.
|
||||
|
||||
`<VacationMessageContent>` is the vacation message, there are four ways to specify it:
|
||||
* `message|textmessage|htmlmessage <String>` - Use `<String>` as the vacation message
|
||||
* `file|htmlfile <FileName> [charset <Charset>]` - Read the vacation message from `<FileName>`
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
- [Display group details in CSV format](#display-group-details-in-csv-format)
|
||||
- [Display group counts as an indented list](#display-group-counts-as-an-indented-list)
|
||||
- [Display group counts in CSV format](#display-group-counts-in-csv-format)
|
||||
- [Display total group counts as an indented list](#display-total-group-counts-as-an-indented-list)
|
||||
- [Display total group counts in CSV format](#display-total-group-counts-in-csv-format)
|
||||
- [Display group addresses in CSV format](#display-group-addresses-in-csv-format)
|
||||
- [Display groups and their parents](#display-groups-and-their-parents)
|
||||
- [Add a target user to the same groups as a source user](#add-a-target-user-to-the-same-groups-as-a-source-user)
|
||||
@@ -461,6 +463,10 @@ gam <UserTypeEntity> show groups
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>] countsonly
|
||||
```
|
||||
By default, all groups to which a member belongs are displayed, these options allow selection of subsets of groups:
|
||||
* `domain <DomainName>` - Limit display to groups in the domain `<DomainName>` of which they are a member
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
* `roles <GroupRoleList>` - Limit display to those groups for which the user has a specific role
|
||||
|
||||
### Display group counts in CSV format
|
||||
There is one row per user displaying the number of groups, by role, to which a user belongs.
|
||||
@@ -476,6 +482,33 @@ By default, all groups to which a member belongs are displayed, these options al
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
* `roles <GroupRoleList>` - Limit display to those groups for which the user has a specific role
|
||||
|
||||
### Display total group counts as an indented list
|
||||
There is one row per user displaying the number of groups to which a user belongs.
|
||||
|
||||
There is one API call per user to get the total group count.
|
||||
```
|
||||
gam <UserTypeEntity> show groups
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
totalonly
|
||||
```
|
||||
By default, all groups to which a member belongs are displayed, these options allow selection of subsets of groups:
|
||||
* `domain <DomainName>` - Limit display to groups in the domain `<DomainName>` of which they are a member
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
|
||||
|
||||
### Display total group counts in CSV format
|
||||
There is one row per user displaying the total number of groups to which a user belongs.
|
||||
|
||||
There is one API call per user to get the total group count.
|
||||
```
|
||||
gam <UserTypeEntity> print groups [todrive <ToDriveAttribute>*]
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
totalonly
|
||||
```
|
||||
By default, all groups to which a member belongs are displayed, these options allow selection of subsets of groups:
|
||||
* `domain <DomainName>` - Limit display to groups in the domain `<DomainName>` of which they are a member
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
|
||||
### Display group addresses in CSV format
|
||||
There is one row per user showing the number and list of groups to which a user directly belongs.
|
||||
```
|
||||
|
||||
@@ -59,6 +59,7 @@ gam user user@domain.com check serviceaccount
|
||||
|
||||
```
|
||||
<JSONData> ::= (json [charset <Charset>] <String>) | (json file <FileName> [charset <Charset>]) |
|
||||
<QueryContact> ::= <String>
|
||||
|
||||
<PeopleResourceName> ::= people/<String>
|
||||
<PeopleResourceNameList> ::= "<PeopleResourceName>(,<PeopleResourceName>)*"
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
- [Display Shared Drive access](#display-shared-drive-access)
|
||||
- [Display Shared Drive access for specific Shared Drives](#display-shared-drive-access-for-specific-shared-drives)
|
||||
- [Display Shared Drive access for selected Shared Drives](#display-shared-drive-access-for-selected-shared-drives)
|
||||
- [Change User1 Shared Drive access to User2](#change-user1-shared-drive-access-to-user2)
|
||||
- [Change single User1 Shared Drive access to User2](#change-single-user1-shared-drive-access-to-user2)
|
||||
- [Bulk change User1 Shared Drive access to User2](#bulk-change-user1-shared-drive-access-to-user2)
|
||||
- [Display empty folders on a Shared Drive](#display-empty-folders-on-a-shared-drive)
|
||||
- [Delete empty folders on a Shared Drive](#delete-empty-folders-on-a-shared-drive)
|
||||
- [Empty the trash on a Shared Drive](#empty-the-trash-on-a-shared-drive)
|
||||
@@ -73,6 +74,22 @@
|
||||
<OrgUnitPath> ::= /|(/<String>)+
|
||||
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
|
||||
<DriveFileACLRole> ::=
|
||||
manager|organizer|owner|
|
||||
contentmanager|fileorganizer|
|
||||
@@ -375,7 +392,6 @@ When deleting permissions from JSON data, permissions with role `owner` true are
|
||||
These commands are used to display the ACLs on Shared Drives themselves, not the files/folders on the Shared Drives.
|
||||
|
||||
## Display Shared Drive access for specific Shared Drives
|
||||
These commands must be issued by a user with Shared Drive permission role organizer.
|
||||
```
|
||||
gam <UserTypeEntity> show drivefileacls <DriveFileEntity>
|
||||
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
|
||||
@@ -404,7 +420,6 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
## Display Shared Drive access for selected Shared Drives
|
||||
These commands must be issued by a user with Shared Drive permission role organizer.
|
||||
```
|
||||
gam <UserTypeEntity> show teamdriveacls
|
||||
adminaccess [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
@@ -421,6 +436,10 @@ gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default,only Shared Drives with `<UserTypeEntity>` as a member are displayed. To display all
|
||||
Shared Drives in the workspace, `<UserTypeEntity>` should specify a super admin and the `adminaccess`
|
||||
option shoud be used.
|
||||
|
||||
By default, all Shared Drives are displayed; use the following options to select a subset of Shared Drives:
|
||||
* `teamdriveadminquery|query <QueryTeamDrive>` - Use a query to select Shared Drives
|
||||
* `matchname <RegularExpression>` - Retrieve Shared Drives with names that match a pattern.
|
||||
@@ -448,14 +467,27 @@ gam <UserTypeEntity> print emptydrivefolders [todrive <ToDriveAttribute>*]
|
||||
select <SharedDriveEntity>
|
||||
```
|
||||
|
||||
## Change User1 Shared Drive access to User2
|
||||
## Change single User1 Shared Drive access to User2
|
||||
```
|
||||
# Get Shared Drives for User1
|
||||
gam redirect csv ./U1SharedDrives.csv user user1@domain.com print shareddriveacls pm emailaddress user1@domain.com em oneitemperrow
|
||||
# For each of those Shared Drives, delete User1 access
|
||||
gam redirect stdout ./DeleteU1SharedDriveAccess.txt multiprocess redirect stderr stdout gam delete drivefileacl "~id" "~permission.emailAddress"
|
||||
gam redirect stdout ./DeleteU1SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam delete drivefileacl "~id" "~permission.emailAddress"
|
||||
# For each of those Shared Drives, add User2 with the same role that User1 had
|
||||
gam redirect stdout ./AddU2SharedDriveAccess.txt multiprocess redirect stderr stdout gam create drivefileacl "~id" user user2@domain.com role "~permission.role"
|
||||
gam redirect stdout ./AddU2SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam create drivefileacl "~id" user user2@domain.com role "~permission.role"
|
||||
```
|
||||
|
||||
## Bulk change User1 Shared Drive access to User2
|
||||
This requires GAM version 6.79.09 or higher.
|
||||
|
||||
Make a CSV file Users.csv with two email address columns: User,Replace
|
||||
```
|
||||
# Get Shared Drives for all Users in CSV file
|
||||
gam redirect csv ./U1SharedDrives.csv multiprocess csv Users.csv gam user "~User" print shareddriveacls pm emailaddress "~User" em oneitemperrow addscvdata Replace "~Replace"
|
||||
# For each of those Shared Drives, delete User access
|
||||
gam redirect stdout ./DeleteU1SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam delete drivefileacl "~id" "~permission.emailAddress"
|
||||
# For each of those Shared Drives, add Replace with the same role that User had
|
||||
gam redirect stdout ./AddU2SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam create drivefileacl "~id" user "~Replace" role "~permission.role"
|
||||
```
|
||||
|
||||
## Delete empty folders on a Shared Drive
|
||||
|
||||
@@ -21,6 +21,7 @@ gam <UserTypeEntity> signout
|
||||
Turn off 2-Step Verification for a user.
|
||||
If successful, this call will turn off 2-Step Verification and also remove all registered second steps on the user account.
|
||||
This call will fail if **any** of the following is true:
|
||||
* the user is suspended
|
||||
* the user is not enrolled in 2-Step Verification.
|
||||
* the user has 2-Step Verification enforced.
|
||||
* the user is enrolled in the Advanced Protection Program.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
\# Version and Help
|
||||
# Version and Help
|
||||
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAMADV-XTD3 6.79.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.80.18 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.4 64-bit final
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -15,9 +15,9 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAMADV-XTD3 6.79.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.80.18 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.4 64-bit final
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -27,9 +27,9 @@ Your system time differs from www.googleapis.com by less than 1 second
|
||||
Print the current version of Gam with extended details and SSL information
|
||||
```
|
||||
gam version extended
|
||||
GAMADV-XTD3 6.79.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.80.18 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.4 64-bit final
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -37,7 +37,7 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Your system time differs from admin.googleapis.com by less than 1 second
|
||||
OpenSSL 3.1.1 30 May 2023
|
||||
cryptography 41.0.1
|
||||
filelock 3.12.4
|
||||
filelock 3.12.5
|
||||
google-api-python-client 2.88.0
|
||||
google-auth-httplib2 0.1.0
|
||||
google-auth-oauthlib 1.0.0
|
||||
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 6.79.03
|
||||
Latest: 6.80.18
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
6.79.03
|
||||
6.80.18
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,9 +82,9 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 6.79.03 - https://github.com/taers232c/GAMADV-XTD3
|
||||
GAM 6.80.18 - https://github.com/taers232c/GAMADV-XTD3
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.4 64-bit final
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
@@ -627,6 +627,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
(tdnotify [<Boolean>])|
|
||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||
(tdretaintitle [<Boolean>])|
|
||||
(tdreturnidonly [<Boolean>])|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
@@ -1053,12 +1054,17 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_top_files |
|
||||
@@ -1994,6 +2000,7 @@ gam revoke browsertoken <BrowserTokenPermanentID>
|
||||
org|
|
||||
orgunit|
|
||||
orgunitpath|
|
||||
ou|
|
||||
revoketime|
|
||||
revokerid|
|
||||
state|
|
||||
@@ -2938,44 +2945,58 @@ gam <UserTypeEntity> show contactdelegates [shownames] [csv]
|
||||
gam create|add course [id|alias <CourseAlias>] <CourseAttribute>*
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
[markpublishedasdraft [<Boolean>]]
|
||||
[members none|all|students|teachers]]
|
||||
[logdrivefileids [<Boolean>]]
|
||||
|
||||
gam update course <CourseID> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
[markpublishedasdraft [<Boolean>]]
|
||||
[members none|all|students|teachers]]
|
||||
[logdrivefileids [<Boolean>]]
|
||||
gam delete course <CourseID> [archive|archived]
|
||||
|
||||
gam update courses <CourseEntity> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
[markpublishedasdraft [<Boolean>]]
|
||||
[members none|all|students|teachers]]
|
||||
[logdrivefileids [<Boolean>]]
|
||||
|
||||
gam delete course <CourseID> [archive|archived]
|
||||
gam delete courses <CourseEntity> [archive|archived]
|
||||
|
||||
gam course <CourseID> create|add alias <CourseAlias>
|
||||
@@ -3036,6 +3057,7 @@ gam print course-participants [todrive <ToDriveAttribute>*]
|
||||
creationtime|
|
||||
creator|creatoruserid|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -3056,6 +3078,7 @@ gam print course-participants [todrive <ToDriveAttribute>*]
|
||||
creator|creatoruserid|
|
||||
description|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -3098,6 +3121,7 @@ gam print course-participants [todrive <ToDriveAttribute>*]
|
||||
duedate|
|
||||
duetime|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
maxpoints|
|
||||
scheduledtime|
|
||||
@@ -3147,6 +3171,7 @@ gam print course-works [todrive <ToDriveAttribute>*]
|
||||
(workids <CourseWorkIDEntity>)|((workstates <CourseWorkStateList>)*
|
||||
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
|
||||
[showcreatoremails|creatoremail] [showtopicnames] [fields <CourseWorkFieldNameList>]
|
||||
[showstudentsaslist [<Boolean>]] [delimiter <Character>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
|
||||
@@ -3793,6 +3818,7 @@ gam print group-members [todrive <ToDriveAttribute>*]
|
||||
[types <GroupTypeList>]
|
||||
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
|
||||
[userfields <UserFieldNameList>]
|
||||
[allschemas|(schemas|custom|customschemas <SchemaNameList>)]
|
||||
[(recursive [noduplicates])|includederivedmembership] [nogroupemail]
|
||||
[peoplelookup|(peoplelookupuser <EmailAddress>)]
|
||||
[unknownname <String>] [cachememberinfo [Boolean]]
|
||||
@@ -4225,8 +4251,9 @@ gam show orgtree [fromparent <OrgUnitItem>] [batchsuborgs [<Boolean>]]
|
||||
users
|
||||
<OrgUnitCheckNameList> ::= "<OrgUnitCheckName>(,<OrgUnitCheckName>)*"
|
||||
|
||||
gam check org|ou <OrgUnitItem> [todrive <ToDriveAttribute>*]
|
||||
gam check ou|org <OrgUnitItem> [todrive <ToDriveAttribute>*]
|
||||
[<OrgUnitCheckName>*|(fields <OrgUnitCheckNameList>)]
|
||||
[filename <FileName>] [movetoou <OrgUnitItem>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Printers
|
||||
@@ -4926,6 +4953,7 @@ gam print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
|
||||
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
|
||||
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show teamdriveacls
|
||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||
@@ -4955,6 +4983,7 @@ gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
|
||||
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
[shownopermissionsdrives false|true|only]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam <UserTypeEntity> show teamdriveacls
|
||||
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
@@ -5355,7 +5384,7 @@ gam download storagefile <StorageBucketObjectName>
|
||||
(note clear|([text_html|text_plain] <String>|
|
||||
(file|htmlfile <FileName> [charset <Charset>])|
|
||||
(gdoc|ghtml <UserGoogleDoc>)))|
|
||||
(org|ou|orgunitpath <OrgUnitPath>|<OrgUnitID>)
|
||||
(ou|org|orgunitpath <OrgUnitPath>|<OrgUnitID>)
|
||||
(password (random [<Integer>])|(uniquerandom [<Integer>])|blocklogin|<Password>)|
|
||||
(recoveryemail <EmailAddress>)|
|
||||
(recoveryphone <string>)|
|
||||
@@ -6489,10 +6518,10 @@ gam <UserTypeEntity> get drivefile <DriveFileEntity> [revision <DriveFileRevisio
|
||||
[donotfollowshortcuts [<Boolean>]] [overwrite [<Boolean>]] [showprogress [<Boolean>]]
|
||||
[acknowledgeabuse [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> delete drivefile <DriveFileEntity> [purge|untrash|trash]
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete drivefile <DriveFileEntity> [purge|untrash|trash] [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
[returnidonly]
|
||||
@@ -6501,7 +6530,7 @@ gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
|
||||
@@ -6984,7 +7013,7 @@ gam <UserTypeEntity> show fileinfo <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
|
||||
@@ -6993,14 +7022,17 @@ gam <UserTypeEntity> show filepath <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname]
|
||||
[fullpath] [folderpathonly [<Boolean>]] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
gam <UserTypeEntity> print filepath <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname] [oneitemperrow]
|
||||
[fullpath] [folderpathonly [<Boolean>]] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
@@ -7009,11 +7041,12 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize]
|
||||
[showsize] [showmimetypesize] (addcsvdata <FieldName> <String>)*
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
gam <UserTypeEntity> show filecounts
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
@@ -7076,6 +7109,7 @@ gam <UserTypeEntity> print fileparenttree <DriveFileEntity> [todrive <ToDriveAtt
|
||||
gam <UserTypeEntity> print filelist [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[choose <DriveFileNameEntity>|<DriveFileEntityShortcut>]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
@@ -7123,7 +7157,7 @@ gam <UserTypeEntity> print diskusage <DriveFileEntity> [todrive <ToDriveAttribut
|
||||
upload
|
||||
<DriveActivityActionList> ::= "<DriveActivityAction>(,<DriveActivityAction>)*"
|
||||
|
||||
gam <UserTypeEntity> print|show driveactivity [todrive <ToDriveAttribute>*]
|
||||
gam <UserTypeEntity> print driveactivity [todrive <ToDriveAttribute>*]
|
||||
[(fileid <DriveFileID>) | (folderid <DriveFolderID>) |
|
||||
(drivefilename <DriveFileName>) | (drivefoldername <DriveFolderName>) | (query <QueryDriveFile>)]
|
||||
[([start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>])|(range <Date>|<Time> <Date>)|<Time>|
|
||||
@@ -7131,7 +7165,7 @@ gam <UserTypeEntity> print|show driveactivity [todrive <ToDriveAttribute>*]
|
||||
[action|actions [not] <DriveActivityActionList>]
|
||||
[consolidationstrategy legacy|none]
|
||||
[idmapfile <CSVFileInput> endcsv]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[stripcrsfromname] [formatjson [quotechar <Character>]]
|
||||
|
||||
<DriveSettingsFieldName> ::=
|
||||
appinstalled|
|
||||
@@ -7424,7 +7458,7 @@ gam <UserTypeEntity> delete messages|threads
|
||||
gam <UserTypeEntity> modify messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
|
||||
(addlabel <LabelName>)* (removelabel <LabelName>)*
|
||||
((addlabel <LabelName>)|(removelabel <LabelName>))+
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> spam messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
@@ -7511,7 +7545,7 @@ gam <UserTypeEntity> show signature|sig [compact|format|html]
|
||||
gam <UserTypeEntity> print signature [compact]
|
||||
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]
|
||||
|
||||
gam <UserTypeEntity> vacation <Boolean> subject <String>
|
||||
gam <UserTypeEntity> vacation [<Boolean>] [subject <String>]
|
||||
[<VacationMessageContent> (replace <Tag> <UserReplacement>)*]
|
||||
[html [<Boolean>]] [contactsonly [<Boolean>]] [domainonly [<Boolean>]]
|
||||
[start|startdate <Date>|Started] [end|enddate <Date>|NotSpecified]
|
||||
@@ -7602,10 +7636,10 @@ gam <UserTypeEntity> check group|groups
|
||||
[roles <GroupRoleList>] [includederivedmembership] [csv] <GroupEntity>
|
||||
gam <UserTypeEntity> print groups [todrive <ToDriveAttribute>*]
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>] [countsonly|nodetails]
|
||||
[roles <GroupRoleList>] [countsonly|totalonly|nodetails]
|
||||
gam <UserTypeEntity> show groups
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>] [countsonly|nodetails]
|
||||
[roles <GroupRoleList>] [countsonly|totalonly|nodetails]
|
||||
gam <UserTypeEntity> print grouptree [todrive <ToDriveAttribute>*]
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>]
|
||||
|
||||
@@ -2,6 +2,197 @@
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
6.80.18
|
||||
|
||||
Updated `gam print|show admins` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
```
|
||||
|
||||
6.80.17
|
||||
|
||||
Updated `gam <UserTypeEntity> modify messages` to improve error handling.
|
||||
|
||||
6.80.16
|
||||
|
||||
Fixed bug in `gam print vaultcounts` that caused a trap.
|
||||
|
||||
6.80.15
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print filelist ... countsrowfilter` that caused a trap.
|
||||
|
||||
Added option `continueoninvalidquery [<Boolean>]` to `gam <UserTypeEntity> print filelist|filecounts` that can be used
|
||||
in special cases where a query of the form `query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels"
|
||||
causes Google to issue an error saying that the query is invalid when, in fact, it is but the user does not have a
|
||||
license that suppprts drive file labels. When `continueoninvalidquery` is true, GAM prints an error message and
|
||||
proceeds to the next user rather that terminating as it does now. Of course, if the query really is invalid, you will
|
||||
get the message for every user.
|
||||
|
||||
6.80.14
|
||||
|
||||
Updated `gam <UserTypeEntity> print messages|threads` to display all default headers
|
||||
even if no messages are to be displayed. This eliminates error messages of the following form
|
||||
that occurred because only the headers `User,threadId,id` were displayed.
|
||||
```
|
||||
WARNING: csv_output_row_filter column "^Date$" does not match any output columns
|
||||
```
|
||||
|
||||
6.80.13
|
||||
|
||||
Added `my_publishable_items` to `<DriveFileQueryShortcut>` that can be used in
|
||||
`gam <UserTypeEntity> print filerevisions` to select only those items that can be
|
||||
published to the web: documents, forms, presentations(slides), spreadsheets. With row filtering,
|
||||
this allows identification of files that have been published outside your domain.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Files-Display#display-files-published-to-the-web
|
||||
|
||||
6.80.12
|
||||
|
||||
Updated `gam print vaultcounts` to correctly display accounts with errors.
|
||||
|
||||
6.80.11
|
||||
|
||||
Updated `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity> shortcutandtarget`
|
||||
that when `<DriveFileEntity` is a shortcut, to have GAM validate that the shortcut and target can be
|
||||
successfully processed before proceeding.
|
||||
|
||||
6.80.10
|
||||
|
||||
Added option `followshortcuts [<Boolean>]` to `gam <UserTypeEntity> print|show fileinfo|filepath <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to display information about the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
Added option `shortcutandtarget [<Boolean>]` to `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
6.80.09
|
||||
|
||||
Added options `allschemas|(schemas|custom|customschemas <SchemaNameList>)` to `gam print group-members`
|
||||
that display any custom schema values for the group members.
|
||||
|
||||
6.80.08
|
||||
|
||||
Updated `gam print|show oushareddrives` to display the Shared Drive ID, name and orgUnitPath as
|
||||
individual, separate entities in the output.
|
||||
|
||||
6.80.07
|
||||
|
||||
Updated `dateheaderformat iso` in `gam <UserTypeEntity> info|print|show messages` to include a colon
|
||||
between the hours and minutes in the timezone portion of the string as in all other time strings.
|
||||
|
||||
6.80.06
|
||||
|
||||
Added option `tdreturnidonly [<Boolean>]` to `<ToDriveAttribute>` that when true (the default), causes GAM to display
|
||||
only the uploaded file ID to stdout. This can be captured and used in subsequent commands, `tdfileid <DriveFileID>` that will update the same file.
|
||||
|
||||
6.80.05
|
||||
|
||||
Added option `individualstudentcoursework copy|delete|maptoall` to `gam create|update course ... copyfrom`
|
||||
that controls how individual student coursework in the `copyfrom` course is processed.
|
||||
* `individualstudentcoursework copy` - Copy individual student coursework; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentcoursework delete` - Delete individual student coursework
|
||||
* `individualstudentcoursework maptoall` - Map individual student coursework to all student coursework
|
||||
|
||||
For convenience, setting `individualstudentassignments` sets all of the following to the same value:
|
||||
*`individualstudentannouncements`
|
||||
*`individualstudentmaterials`
|
||||
*`individualstudentcoursework`
|
||||
|
||||
6.80.04
|
||||
|
||||
Cleaned up progress messages in `gam create|update course ... copyfrom`.
|
||||
|
||||
6.80.03
|
||||
|
||||
Added option `stripcrsfromname` to `gam <UserTypeEntity> print driveactivity` that causes carriage returns,
|
||||
linefeeds and nulls to be stripped from file names.
|
||||
|
||||
6.80.02
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print filecounts` that adds
|
||||
additional columns of data to the CSV file output.
|
||||
|
||||
Added options `individualstudentannouncements copy|delete|maptoall` and `individualstudentmaterials copy|delete|maptoall`
|
||||
to `gam create|update course ... copyfrom` that controls how individual student announcements and materials in the `copyfrom` course are processed.
|
||||
* `individualstudentannouncements copy` - Copy individual student announcements; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentannouncements delete` - Delete individual student announcements
|
||||
* `individualstudentannouncements maptoall` - Map individual student announcements to all student announcements
|
||||
* `individualstudentmaterials copy` - Copy individual student materials; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentmaterials delete` - Delete individual student materials
|
||||
* `individualstudentmaterials maptoall` - Map individual student materials to all student materials
|
||||
|
||||
6.80.01
|
||||
|
||||
Added options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to `gam print course-work`.
|
||||
By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns.
|
||||
Use these options to display the student IDs in a single column as a delimited list.
|
||||
|
||||
Updated `gam <UserTypeEntity> vacation [<Boolean>]` to make `<Boolean>` optional; this allows changes
|
||||
to other fields without affecting the current responder state.
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show vacation` to avoid a trap when invalid start or end dates
|
||||
have been entered in the Gmail user interface. Invalid dates are represented as `1970-01-01`.
|
||||
|
||||
6.80.00
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print users ... license ... formatjson` that caused a trap.
|
||||
|
||||
Upgraded to Python 3.12.5 where possible.
|
||||
|
||||
6.79.12
|
||||
|
||||
Fixed bug in `gam user admin@domain.com print chatspaces asadmin` that caused the following error:
|
||||
```
|
||||
Chat Admin: admin@domain.com(asadmin), Print Failed: This method doesn't support non-admin user authentication. Authenticate with an admin account.
|
||||
```
|
||||
|
||||
6.79.11
|
||||
|
||||
Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied.
|
||||
|
||||
6.79.10
|
||||
|
||||
Updated commands to handle a trap that occurs when oauth2service.json specifies a YubiKey but the YubiKey is not inserted.
|
||||
|
||||
6.79.09
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print teamdriveacls` that adds
|
||||
additional columns of data to the CSV file output. This can be used when ACLs for selected users are to be
|
||||
replaced with a different user email address.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Shared-Drives#bulk-change-user1-shared-drive-access-to-user2
|
||||
|
||||
6.79.08
|
||||
|
||||
Clarified action to perform messages when creating/deleting/updating licenses.
|
||||
|
||||
6.79.07
|
||||
|
||||
Added option `totalonly` to `gam <UserTypeEntity> print|show groups` that displays
|
||||
the user email address and the total number of groups to which it belongs. This is in
|
||||
contrast to `countsonly` that has to make an additional API call per group per user to get the user's role.
|
||||
When `countsonly` is specified, an additional column `Total` is displayed that is the sum
|
||||
of the role counts.
|
||||
|
||||
6.79.06
|
||||
|
||||
Fixed bug in `gam calendars <CalendarEntity> update event ... removeattendee <EmailAddress>` that caused a trap
|
||||
if the event had no attendees.
|
||||
|
||||
6.79.05
|
||||
|
||||
Updated `gam <UserTypeEntity> empty drivetrash <SharedDriveEntity>` to handle this error that
|
||||
occurs when the user is not a Manager of the Shared Drive.
|
||||
```
|
||||
ERROR: 403: insufficientFilePermissions - The user does not have sufficient permissions for this file.
|
||||
```
|
||||
|
||||
6.79.04
|
||||
|
||||
Added options `filename <FileName>` and `movetoou <OrgUnitItem>` to `gam check ou <OrgUnitItem>`
|
||||
that causes GAM to create a batch file of GAM commands that will move any remaining items
|
||||
in `ou <OrgUnitItem>` to `movetoou <OrgUnitItem>`; executing the batch file will then allow
|
||||
`ou <OrgUnitItem>` to be deleted if desired.
|
||||
|
||||
6.79.03
|
||||
|
||||
Added column|field `assignedToUnknown` to `gam print|show admins` that will be True when
|
||||
@@ -147,7 +338,7 @@ Thanks to Jay, added option `nokey` to `gam create project` that creates a proje
|
||||
|
||||
Added option `individualstudentassignments copy|delete|maptoall` to `gam create|update course ... copyfrom`
|
||||
that controls how individual student assignments in the `copyfrom` course are processed.
|
||||
* `individualstudentassignments copy` - Copy individual student assignments; this is the default. You will get an error if the student is not a member of the course.
|
||||
* `individualstudentassignments copy` - Copy individual student assignments; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentassignments delete` - Delete individual student assignments
|
||||
* `individualstudentassignments maptoall` - Map individual student assignments to all student assignments
|
||||
|
||||
@@ -253,7 +444,7 @@ and was `Waiting for N running processes to finish before terminating`.
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print messages ... positivecountsonly` where message counts with value 0 were deiplayed.
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print|messages` that adds
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print messages` that adds
|
||||
additional columns of data to the CSV file output.
|
||||
|
||||
Added option `showusagebytes` to `gam <UserTypeEntity> print|show drivesettings` that displays
|
||||
@@ -18160,4 +18351,3 @@ This isn't elegant but it's a start; you can say:
|
||||
with open(GAM_STDOUT, 'rU') as f:
|
||||
for line in f:
|
||||
sys.stdout.write(line)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ datas += [('datastudio-v1.json', '.')]
|
||||
datas += [('serviceaccountlookup-v1.json', '.')]
|
||||
datas += [('cacerts.pem', '.')]
|
||||
hiddenimports = [
|
||||
'gam.auth.yubikey',
|
||||
'gam.gamlib.yubikey',
|
||||
]
|
||||
|
||||
a = Analysis(
|
||||
@@ -35,7 +35,7 @@ a = Analysis(
|
||||
win_private_assemblies=False,
|
||||
cipher=None,
|
||||
noarchive=False,
|
||||
)
|
||||
)
|
||||
for d in a.datas:
|
||||
if 'pyconfig' in d[0]:
|
||||
a.datas.remove(d)
|
||||
@@ -117,4 +117,3 @@ else:
|
||||
upx_exclude=[],
|
||||
name=name,
|
||||
)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -259,7 +259,7 @@ _INFO = {
|
||||
PUBSUB: {'name': 'Pub / Sub API', 'version': 'v1', 'v2discovery': True},
|
||||
REPORTS: {'name': 'Reports API', 'version': 'reports_v1', 'v2discovery': True, 'mappedAPI': 'admin'},
|
||||
RESELLER: {'name': 'Reseller API', 'version': 'v1', 'v2discovery': True},
|
||||
SERVICEACCOUNTLOOKUP: {'name': 'Service Account Lookup psuedo-API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
|
||||
SERVICEACCOUNTLOOKUP: {'name': 'Service Account Lookup pseudo-API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
|
||||
SERVICEMANAGEMENT: {'name': 'Service Management API', 'version': 'v1', 'v2discovery': True},
|
||||
SERVICEUSAGE: {'name': 'Service Usage API', 'version': 'v1', 'v2discovery': True},
|
||||
SHEETS: {'name': 'Sheets API', 'version': 'v4', 'v2discovery': True},
|
||||
@@ -475,7 +475,7 @@ _CLIENT_SCOPES = [
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/apps.order'},
|
||||
{'name': 'Service Account Lookup psuedo-API',
|
||||
{'name': 'Service Account Lookup pseudo-API',
|
||||
'api': SERVICEACCOUNTLOOKUP,
|
||||
'subscopes': [],
|
||||
'scope': ''},
|
||||
@@ -499,6 +499,10 @@ _TODRIVE_CLIENT_SCOPES = [
|
||||
'api': DRIVE3,
|
||||
'subscopes': [],
|
||||
'scope': DRIVE_SCOPE},
|
||||
{'name': 'Drive File API - todrive_clientaccess',
|
||||
'api': DRIVE3,
|
||||
'subscopes': [],
|
||||
'scope': 'https://www.googleapis.com/auth/drive.file'},
|
||||
{'name': 'Gmail API - todrive_clientaccess',
|
||||
'api': GMAIL,
|
||||
'subscopes': [],
|
||||
|
||||
@@ -672,6 +672,8 @@ class GamCLArgs():
|
||||
ARG_ORG = 'org'
|
||||
ARG_ORGS = 'orgs'
|
||||
ARG_ORGTREE = 'orgtree'
|
||||
ARG_ORGUNIT = 'orgunit'
|
||||
ARG_ORGUNITS = 'orgunits'
|
||||
ARG_ORGUNITSHAREDDRIVE = 'orgunitshareddrive'
|
||||
ARG_ORGUNITSHAREDDRIVES = 'orgunitshareddrives'
|
||||
ARG_ORPHANS = 'orphans'
|
||||
|
||||
@@ -133,10 +133,12 @@ class GamEntity():
|
||||
COPYFROM_GROUP = 'cfgr'
|
||||
COURSE = 'cour'
|
||||
COURSE_ALIAS = 'coal'
|
||||
COURSE_ANNOUNCEMENT = 'cann'
|
||||
COURSE_ANNOUNCEMENT_ID = 'caid'
|
||||
COURSE_ANNOUNCEMENT_STATE = 'cast'
|
||||
COURSE_MATERIAL_DRIVEFILE = 'comd'
|
||||
COURSE_MATERIAL_FORM = 'comf'
|
||||
COURSE_MATERIAL = 'cmtl'
|
||||
COURSE_MATERIAL_ID = 'cmid'
|
||||
COURSE_MATERIAL_STATE = 'cmst'
|
||||
COURSE_NAME = 'cona'
|
||||
@@ -204,6 +206,7 @@ class GamEntity():
|
||||
DRIVE_PATH = 'drvp'
|
||||
DRIVE_SETTINGS = 'drvs'
|
||||
DRIVE_SHORTCUT = 'drsc'
|
||||
DRIVE_SHORTCUT_ID = 'dsci'
|
||||
DRIVE_3PSHORTCUT = 'dr3s'
|
||||
DRIVE_TRASH = 'drvt'
|
||||
EMAIL = 'emai'
|
||||
@@ -475,10 +478,12 @@ class GamEntity():
|
||||
COPYFROM_GROUP: ['Copy From Groups', 'CopyFrom Group'],
|
||||
COURSE: ['Courses', 'Course'],
|
||||
COURSE_ALIAS: ['Course Aliases', 'Course Alias'],
|
||||
COURSE_ANNOUNCEMENT: ['Course Announcements', 'Course Announcement'],
|
||||
COURSE_ANNOUNCEMENT_ID: ['Course Announcement IDs', 'Course Announcement ID'],
|
||||
COURSE_ANNOUNCEMENT_STATE: ['Course Announcement States', 'Course Announcement State'],
|
||||
COURSE_MATERIAL_DRIVEFILE: ['Course Material Drive Files', 'Course Material Drive File'],
|
||||
COURSE_MATERIAL_FORM: ['Course Material Forms', 'Course Material Form'],
|
||||
COURSE_MATERIAL: ['Course Materials', 'Course Material'],
|
||||
COURSE_MATERIAL_ID: ['Course Material IDs', 'Course Material ID'],
|
||||
COURSE_MATERIAL_STATE: ['Course Material States', 'Course Material State'],
|
||||
COURSE_NAME: ['Course Names', 'Course Name'],
|
||||
@@ -546,6 +551,7 @@ class GamEntity():
|
||||
DRIVE_PATH: ['Drive Paths', 'Drive Path'],
|
||||
DRIVE_SETTINGS: ['Drive Settings', 'Drive Settings'],
|
||||
DRIVE_SHORTCUT: ['Drive Shortcuts', 'Drive Shortcut'],
|
||||
DRIVE_SHORTCUT_ID: ['Drive Shortcut IDs', 'Drive Shortcut ID'],
|
||||
DRIVE_3PSHORTCUT: ['Drive 3rd Party Shortcuts', 'Drive 3rd Party Shortcut'],
|
||||
DRIVE_TRASH: ['Drive Trash', 'Drive Trash'],
|
||||
EMAIL: ['Email Addresses', 'Email Address'],
|
||||
|
||||
@@ -257,7 +257,9 @@ FORBIDDEN = 'Forbidden'
|
||||
FORMAT_NOT_AVAILABLE = 'Format ({0}) not available'
|
||||
FORMAT_NOT_DOWNLOADABLE = 'Format not downloadable'
|
||||
FROM = 'From'
|
||||
FROM_LC = 'from'
|
||||
FULL_PATH_MUST_START_WITH_DRIVE = 'fullpath must start with {0} or {1}'
|
||||
GAM_BATCH_FILE_WRITTEN = 'GAM batch file {0} written\n'
|
||||
GAM_LATEST_VERSION_NOT_AVAILABLE = 'GAM Latest Version information not available'
|
||||
GAM_OUT_OF_MEMORY = 'GAM has run out of memory. If this is a large Google Workspace instance, you should use a 64-bit version of GAM on Windows or a 64-bit version of Python on other systems.'
|
||||
GENERATING_NEW_PRIVATE_KEY = 'Generating new private key'
|
||||
@@ -318,6 +320,7 @@ IS_NOT_UNIQUE = 'Is not unique, {0}: {1}'
|
||||
IS_REQD_TO_CHG_PWD_NO_DELEGATION = 'Is required to change password at next login. You must change password or clear changepassword flag for delegation.'
|
||||
IS_SUSPENDED_NO_BACKUPCODES = 'User is suspended. You must unsuspend to process backupcodes'
|
||||
IS_SUSPENDED_NO_DELEGATION = 'Is suspended. You must unsuspend for delegation.'
|
||||
IS_YUBIKEY_INSERTED = 'Is YubiKey inserted?'
|
||||
JSON_ERROR = 'JSON error "{0}" in file {1}'
|
||||
JSON_KEY_NOT_FOUND = 'JSON key "{0}" not found in file {1}'
|
||||
KIOSK_MODE_REQUIRED = ' This command ({0}) requires that the ChromeOS device be in Kiosk mode.'
|
||||
@@ -393,6 +396,7 @@ NO_ENTITIES_MATCHED = 'No {0} matched'
|
||||
NO_FILTER_ACTIONS = 'No {0} actions specified'
|
||||
NO_FILTER_CRITERIA = 'No {0} criteria specified'
|
||||
NO_LABELS_MATCH = 'No Labels match'
|
||||
NO_LABELS_TO_PROCESS = 'No Labels to process'
|
||||
NO_MESSAGES_WITH_LABEL = 'No Messages with Label'
|
||||
NO_PARENTS_TO_CONVERT_TO_SHORTCUTS = 'No parents to convert to shortcuts'
|
||||
NO_REPORT_AVAILABLE = 'No {0} report available.'
|
||||
@@ -420,6 +424,8 @@ ONLY_ONE_DEVICE_SELECTION_ALLOWED = 'Only one device selection allowed, filter =
|
||||
ONLY_ONE_JSON_RANGE_ALLOWED = 'Only one range/json allowed'
|
||||
ONLY_ONE_OWNER_ALLOWED = 'Only one owner allowed'
|
||||
OR = 'or'
|
||||
OU_AND_MOVETOOU_CANNOT_BE_IDENTICAL = 'ou {0} can not be be identical to movetoou {1}'
|
||||
OU_SUBOUS_CANNOT_BE_MOVED_TO_MOVETOOU = 'ou {0} sub OUs can not be be moved to movetoou {1}'
|
||||
PERMISSION_DENIED = 'The caller does not have permission'
|
||||
PLEASE_CORRECT_YOUR_SYSTEM_TIME = 'Please correct your system time.'
|
||||
PLEASE_ENTER_A_OR_M = 'Please enter a or m ...\n'
|
||||
@@ -451,6 +457,7 @@ SCHEMA_WOULD_HAVE_NO_FIELDS = '{0} would have no {1}'
|
||||
SELECTED = 'Selected'
|
||||
SERVICE_NOT_APPLICABLE = 'Service not applicable/Does not exist'
|
||||
SERVICE_NOT_APPLICABLE_THIS_ADDRESS = 'Service not applicable for this address: {0}'
|
||||
SHORTCUT_TARGET_CAPABILITY_IS_FALSE = '{0} capability {1} is False'
|
||||
STARTING_THREAD = 'Starting thread'
|
||||
STATISTICS_COPY_FILE = 'Total: {0}, Copied: {1}, Shortcut created {2}, Shortcut exists {3}, Duplicate: {4}, Copy Failed: {5}, Not copyable: {6}, In skipids: {7}, Permissions Failed: {8}, Protected Ranges Failed: {9}'
|
||||
STATISTICS_COPY_FOLDER = 'Total: {0}, Copied: {1}, Shortcut created {2}, Shortcut exists {3}, Duplicate: {4}, Merged: {5}, Copy Failed: {6}, Not writable: {7}, Permissions Failed: {8}'
|
||||
@@ -465,6 +472,8 @@ TASKLIST_TITLE_NOT_FOUND = 'Task list title not found'
|
||||
THREAD = 'thread'
|
||||
THREADS = 'threads'
|
||||
TO = 'To'
|
||||
TO_LC = 'to'
|
||||
TO_MAXIMUM_OF = 'to maximum of'
|
||||
TO_SET_UP_GOOGLE_CHAT = """
|
||||
To set up Google Chat for your API project, please go to:
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ class YubiKey():
|
||||
return publicKeyData
|
||||
except ValueError as err:
|
||||
systemErrorExit(YUBIKEY_VALUE_ERROR_RC, f'YubiKey - {err}')
|
||||
except TypeError as err:
|
||||
systemErrorExit(YUBIKEY_NOT_FOUND_RC, f'YubiKey - {err} - {Msg.IS_YUBIKEY_INSERTED}')
|
||||
|
||||
def get_serial_number(self):
|
||||
try:
|
||||
@@ -168,6 +170,8 @@ class YubiKey():
|
||||
piv.put_object(OBJECT_ID.CHUID, generate_chuid())
|
||||
except ValueError as err:
|
||||
systemErrorExit(YUBIKEY_VALUE_ERROR_RC, f'YubiKey - {err}')
|
||||
except TypeError as err:
|
||||
systemErrorExit(YUBIKEY_NOT_FOUND_RC, f'YubiKey - {err} - {Msg.IS_YUBIKEY_INSERTED}')
|
||||
|
||||
def sign(self, message):
|
||||
if mplock is not None:
|
||||
@@ -191,6 +195,8 @@ class YubiKey():
|
||||
systemErrorExit(YUBIKEY_APDU_ERROR_RC, f'YubiKey - {err}')
|
||||
except ValueError as err:
|
||||
systemErrorExit(YUBIKEY_VALUE_ERROR_RC, f'YubiKey - {err}')
|
||||
except TypeError as err:
|
||||
systemErrorExit(YUBIKEY_NOT_FOUND_RC, f'YubiKey - {err} - {Msg.IS_YUBIKEY_INSERTED}')
|
||||
if mplock is not None:
|
||||
mplock.release()
|
||||
return signed
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"basePath": "",
|
||||
"baseUrl": "https://www.googleapis.com/service_accounts/v1",
|
||||
"canonicalName": "serviceaccountlookup",
|
||||
"description": "Psuedo-API to lookup public certificates for a service account anonymously",
|
||||
"description": "Pseudo-API to lookup public certificates for a service account anonymously",
|
||||
"discoveryVersion": "v1",
|
||||
"documentationLink": "https://example.com/",
|
||||
"fullyEncodeReservedExpansion": true,
|
||||
@@ -135,7 +135,7 @@
|
||||
}
|
||||
},
|
||||
"servicePath": "",
|
||||
"title": "Service Account Lookup Psuedo-API",
|
||||
"title": "Service Account Lookup Pseudo-API",
|
||||
"version": "v1",
|
||||
"version_module": true
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"basePath": "",
|
||||
"baseUrl": "https://www.googleapis.com/service_accounts/v1",
|
||||
"canonicalName": "serviceaccountlookup",
|
||||
"description": "Psuedo-API to lookup public certificates for a service account anonymously",
|
||||
"description": "Pseudo-API to lookup public certificates for a service account anonymously",
|
||||
"discoveryVersion": "v1",
|
||||
"documentationLink": "https://example.com/",
|
||||
"fullyEncodeReservedExpansion": true,
|
||||
@@ -135,7 +135,7 @@
|
||||
}
|
||||
},
|
||||
"servicePath": "",
|
||||
"title": "Service Account Lookup Psuedo-API",
|
||||
"title": "Service Account Lookup Pseudo-API",
|
||||
"version": "v1",
|
||||
"version_module": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user