Skip to content

Commit

Permalink
Classification labels are now available for Gmail in addition to Drive.
Browse files Browse the repository at this point in the history
  • Loading branch information
taers232c committed Nov 2, 2024
1 parent e725e63 commit d15955e
Show file tree
Hide file tree
Showing 8 changed files with 156 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: taers232c.GAMADV-XTD3
release-tag: v7.00.34
release-tag: v7.00.35
max-versions-to-keep: 1 # keep only latest versions
installers-regex: '\.msi$'
token: ${{ secrets.WINGET_TOKEN }}
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ script:

before_deploy:
# Comment out for Linux Xenial and Trusty
#- yes | gem update --system --force
#- gem install bundler
#- gem install uri
#- gem install logger
- yes | gem update --system --force
- gem install bundler
- gem install uri
- gem install logger
- export TRAVIS_TAG="preview"
- unset LD_LIBRARY_PATH

Expand All @@ -111,10 +111,10 @@ deploy:
skip_cleanup: true
draft: true
# Linux 64-Bit Bionic and Linux ARM64 Focal and Linux ARM64 Bionic and Linux ARM64 Xenial
# edge: true
edge: true
# Linux Xenial and Trusty
edge:
branch: v2.0.3-beta.4
# edge:
# branch: v2.0.3-beta.4
# branch: v2.0.5-beta.1
on:
repo: taers232c/GAMADV-XTD3
Expand Down
118 changes: 50 additions & 68 deletions src/GamCommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ If an item contains spaces, it should be surrounded by ".
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
<CIGroupType> ::= customer|group|other|serviceaccount|user
<CIPolicyName> ::= policies/<String>|settings/<String>|<String>
<ClassificationLabelID> ::= <String>
<ClassificationLabelFieldID> ::= <String>
<ClassificationLabelSelectionID> ::= <String>
<ClassificationLabelName> ::= labels/<ClassificationLabelID>[@latest|@published|@<Number>]
<ClassificationLabelPermissionName> ::= labels/<ClassificationLabelID>[@latest|@published|@<Number>]/permissions/(audiences|groups|people)/<String>
<ClassroomInvitationID> ::= <String>
<ClientID> ::= <String>
<CommandID> ::= <String>
Expand Down Expand Up @@ -448,11 +453,6 @@ If an item contains spaces, it should be surrounded by ".
<DriveFilePermissionID> ::= anyone|anyonewithlink|id:<String>
<DriveFilePermissionIDorEmail> ::= <DriveFilePermissionID>|<EmailAddress>
<DriveFileRevisionID> ::= <String>
<DriveLabelID> ::= <String>
<DriveLabelFieldID> ::= <String>
<DriveLabelSelectionID> ::= <String>
<DriveLabelName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]
<DriveLabelPermissionName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]/permissions/(audiences|groups|people)/<String>
<EmailAddress> ::= <String>@<DomainName>
<EmailItem> ::= <EmailAddress>|<UniqueID>|<String>
<EmailReplacement> ::= <String>
Expand Down Expand Up @@ -694,11 +694,6 @@ If an item contains spaces, it should be surrounded by ".
<DriveFileRevisionIDList> ::= "<DriveFileRevisionID>(,<DriveFileRevisionID>)*"
<DriveFolderIDList> ::= "<DriveFolderID>(,<DriveFolderID>)*"
<DriveFolderNameList> ::= "<DriveFolderName>(,<DriveFolderName>)*"
<DriveLabelIDList> ::= "<DriveLabelID>(,<DriveLabelID>)*"
<DriveLabelNameList> ::= "<DriveLabelName>(,<DriveLabelName>)*"
<DriveLabelPermissionNameList> ::= "<DriveLabelPermissionName>(,<DriveLabelPermissionName>)*"
<DriveLabelFieldIDList> ::= "<DriveLabelFieldID>(,<DriveLabelFieldID>)*"
<DriveLabelSelectionIDList> ::= "<DriveLabelSelectionID>(,<DriveLabelSelectionID>)*"
<EmailAddressList> ::= "<EmailAddress>(,<EmailAddress>)*"
<EmailItemList> ::= "<EmailItem>(,<EmailItem>)*"
<EventIDList> ::= "<EventID>(,<EventID>)*"
Expand Down Expand Up @@ -1004,6 +999,10 @@ Specify a collection of items by directly specifying them; the item type is dete
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<CIPolicyNameEntity> ::=
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
<ClassificationLabelNameEntity> ::=
<ClassificationLabelNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
<ClassificationLabelPermissionNameEntity> ::=
<ClassificationLabelPermissionNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
<ClassroomInvitationIDEntity> ::=
<ClassroomInvitationIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<ContactEntity> ::=
Expand Down Expand Up @@ -1127,10 +1126,6 @@ Specify a collection of items by directly specifying them; the item type is dete
(first|last|allexceptfirst|allexceptlast <Number>)|
(before|after <Time>) | (range <Time> <Time>)|
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<DriveLabelNameEntity> ::=
<DriveLabelNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
<DriveLabelPermissionNameEntity> ::=
<DriveLabelPermissionNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
<EmailAddressEntity> ::=
<EmailAddressList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<FilterIDEntity> ::=
Expand Down Expand Up @@ -2707,6 +2702,35 @@ gam print chromesnvalidity [todrive <ToDriveAttribute>*]
cros_sn <SerialNumberEntity> [listlimit <Number>]
[delimiter <Character>]

# Classification Labels

gam [<UserTypeEntity>] info classificationlabels <ClassificationLabelNameEntity>
[[basic|full] [languagecode <LanguageCode>]
[formatjson] [adminaccess|asadmin]
gam [<UserTypeEntity>] print classificationlabels [todrive <ToDriveAttribute>*]
[basic|full] [languagecode <LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show classificationlabels
[basic|full] [languagecode <LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson] [adminaccess|asadmin]
`
gam [<UserTypeEntity>] create classificationlabelpermission <ClassificationLabelNameEntity>
(user <UserItem>) | (group <GroupItem>) | (audience <String>)
role applier|editor|organizer|reader
[formatjson] [adminaccess|asadmin]
gam [<UserTypeEntity>] delete classificationlabelpermission <ClassificationLabelNameEntity>
(user <UserItem>) | (group <GroupItem>) | (audience <String>)
[adminaccess|asadmin]
gam [<UserTypeEntity>] remove classificationlabelpermission <ClassificationLabelPermissionNameEntity>
[adminaccess|asadmin]

gam [<UserTypeEntity>] print classificationlabelpermissions <ClassificationLabelNameEntity> [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show classificationlabelpermissions <ClassificationLabelNameEntity>
[formatjson] [adminaccess|asadmin]

# Context Aware Access

<QueryCEL> ::= <String>
Expand Down Expand Up @@ -3534,35 +3558,6 @@ gam show people|peopleprofile
[allfields|(fields <PeopleFieldNameList>)] [showmetadata]
[formatjson]

# Drive Labels

gam [<UserTypeEntity>] info drivelabels <DriveLabelNameEntity>
[[basic|full] [languagecode <LanguageCode>]
[formatjson] [adminaccess|asadmin]
gam [<UserTypeEntity>] print drivelabels [todrive <ToDriveAttribute>*]
[basic|full] [languagecode <LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show drivelabels
[basic|full] [languagecode <LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson] [adminaccess|asadmin]
`
gam [<UserTypeEntity>] create drivelabelpermission <DriveLabelNameEntity>
(user <UserItem>) | (group <GroupItem>) | (audience <String>)
role applier|editor|organizer|reader
[formatjson] [adminaccess|asadmin]
gam [<UserTypeEntity>] delete drivelabelpermission <DriveLabelNameEntity>
(user <UserItem>) | (group <GroupItem>) | (audience <String>)
[adminaccess|asadmin]
gam [<UserTypeEntity>] remove drivelabelpermission <DriveLabelPermissionNameEntity>
[adminaccess|asadmin]

gam [<UserTypeEntity>] print drivelabelpermissions <DriveLabelNameEntity> [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show drivelabelpermissions <DriveLabelNameEntity>
[formatjson] [adminaccess|asadmin]

# Email Audit Monitor

gam audit monitor create <EmailAddress> <DestEmailAddress> [begin <DateTime>] [end <DateTime>]
Expand Down Expand Up @@ -6564,7 +6559,7 @@ gam <UserTypeEntity> info drivefile <DriveFileEntity>
[allfields|<DriveFieldName>*|(fields <DriveFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[showdrivename] [showshareddrivepermissions]
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
[(showlabels details|ids)|(includelabels <ClassificationLabelIDList>)]
[showparentsidsaslist] [followshortcuts [<Boolean>]]
[stripcrsfromname]
[formatjson]
Expand Down Expand Up @@ -6668,26 +6663,13 @@ gam <UserTypeEntity> create|add permissions <DriveFileEntity> <DriveFilePermissi
gam <UserTypeEntity> delete permissions <DriveFileEntity> <DriveFilePermissionIDEntity>
<PermissionMatch>* [<PermissionMatchAction>]

gam [<UserTypeEntity>] info drivelabels <DriveLabelNameEntity>
[[basic|full] [languagecode <BCP47LanguageCode>]
[formatjson] [adminaccess|asadmin]

gam [<UserTypeEntity>] print <drivelabels> [todrive <ToDriveAttribute>*]
[basic|full] [languagecode <BCP47LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show drivelabels
[basic|full] [languagecode <BCP47LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson] [adminaccess|asadmin]

gam <UserTypeEntity> process filedrivelabels <DriveFileEntity>
(addlabel <DriveLabelIDList>)*
(deletelabel <DriveLabelIDList>)*
(addlabelfield <DriveLabelID> <DriveLabelFieldID>
(text <String>)|selection <DriveLabelSelectionIDList>)|
(addlabel <ClassificationLabelIDList>)*
(deletelabel <ClassificationLabelIDList>)*
(addlabelfield <ClassificationLabelID> <ClassificationLabelFieldID>
(text <String>)|selection <ClassificationLabelSelectionIDList>)|
(integer <Number>)|(date <Date>)|(user <EmailAddressList>))*
(deletelabelfield <DriveLabelID> <DriveLabelFieldID>)*
(deletelabelfield <ClassificationLabelID> <ClassificationLabelFieldID>)*
[nodetails]

gam show ownership <DriveFileID>|(drivefilename <DriveFileName>)
Expand Down Expand Up @@ -6873,12 +6855,12 @@ gam <UserTypeEntity> collect orphans
contentrestrictions.restrictiontime|
contentrestrictions.type

<DriveLabelInfoSubfieldName> ::=
<ClassificationLabelInfoSubfieldName> ::=
labels.id| # modifiedByMe
labels.revisionid| # copyRequiresWriterPermission
labels.fields # viewedByMe

<DriveLabelsSubfieldName> ::=
<ClassificationLabelsSubfieldName> ::=
labels.modified| # modifiedByMe
labels.restricted| # copyRequiresWriterPermission
labels.starred| # starred
Expand Down Expand Up @@ -6984,9 +6966,9 @@ gam <UserTypeEntity> collect orphans
inheritedpermissionsdisabled|
isappauthorized|
labelinfo|
<DriveLabelInfoSubfieldName>|
<ClassificationLabelInfoSubfieldName>|
labels|
<DriveLabelsSubfieldName>|
<ClassificationLabelsSubfieldName>|
lastmodifyinguser|
<DriveLastModifyingUserSubfieldName>|
lastmodifyingusername|
Expand Down Expand Up @@ -7050,7 +7032,7 @@ gam <UserTypeEntity> show fileinfo <DriveFileEntity>
[allfields|<DriveFieldName>*|(fields <DriveFieldNameList>)]
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
[showdrivename] [showshareddrivepermissions]
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
[(showlabels details|ids)|(includelabels <ClassificationLabelIDList>)]
[showparentsidsaslist] [followshortcuts [<Boolean>]]
[stripcrsfromname]
[formatjson]
Expand Down Expand Up @@ -7166,7 +7148,7 @@ gam <UserTypeEntity> print filelist [todrive <ToDriveAttribute>*]
[filepath|fullpath [folderpathonly [<Boolean>]] [pathdelimiter <Character>] [addpathstojson] [showdepth]] [buildtree]
[allfields|<DriveFieldName>*|(fields <DriveFieldNameList>)]
[showdrivename] [showshareddrivepermissions]
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
[(showlabels details|ids)|(includelabels <ClassificationLabelIDList>)]
[showparentsidsaslist] [showpermissionslast]
(orderby <DriveFileOrderByFieldName> [ascending|descending])* [delimiter <Character>]
[stripcrsfromname]
Expand Down
18 changes: 18 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
7.00.35

Classification labels are now available for Gmail in addition to Drive.

* See: https://workspaceupdates.googleblog.com/2024/11/open-beta-data-classification-labels-gmail.html

The following command synonyms are available, there is no change in functionality:
```
gam [<UserTypeEntity>] info classificationlabels|drivelabels
gam [<UserTypeEntity>] print classificationlabels|drivelabels
gam [<UserTypeEntity>] show classificationlabels|drivelabels
gam [<UserTypeEntity>] create classificationlabelpermission|drivelabelpermission
gam [<UserTypeEntity>] delete classificationlabelpermission|drivelabelpermission
gam [<UserTypeEntity>] remove classificationlabelpermission|drivelabelpermission
gam [<UserTypeEntity>] print classificationlabelpermissions|drivelabelpermission
gam [<UserTypeEntity>] show classificationlabelpermissions|drivelabelpermission
```

7.00.34

Fixed bug introduced in 7.00.33 in `gam print group-members` that caused a trap.
Expand Down
Loading

0 comments on commit d15955e

Please sign in to comment.