mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-05 14:51:39 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe3c043d61 | ||
|
|
83d8135722 | ||
|
|
6caf3f2252 | ||
|
|
b8331a3a4a | ||
|
|
c271349c30 | ||
|
|
329a6e0768 | ||
|
|
fae2dca9dc | ||
|
|
7112a42c96 | ||
|
|
d76618cbad |
@@ -147,7 +147,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<CrOSID> ::= <String>
|
||||
<CustomerID> ::= <String>
|
||||
<DomainAlias> ::= <String>
|
||||
<DriveFileACLRole> ::= commenter|editor|organizer|owner|reader|writer
|
||||
<DriveFileACLRole> ::= commenter|contentmanager|editor|fileorganizer|organizer|owner|reader|writer
|
||||
<DriveFileID> ::= <String>
|
||||
<DriveFileURL> ::= https://docs.google.com/a/<DomainName>/document/d/<DriveFileID>/<String>
|
||||
<DriveFileItem> ::= <DriveFileID>|<DriveFileURL>
|
||||
@@ -246,8 +246,10 @@ If an item contains spaces, it should be surrounded by ".
|
||||
annotatedlocation|location|
|
||||
annotateduser|user|
|
||||
bootmode|
|
||||
cpustatusreports|
|
||||
devicefiles|
|
||||
deviceid|
|
||||
diskvolumereports|
|
||||
ethernetmacaddress|
|
||||
firmwareversion|
|
||||
lastenrollmenttime|
|
||||
@@ -265,8 +267,18 @@ If an item contains spaces, it should be surrounded by ".
|
||||
status|
|
||||
supportenddate|
|
||||
tpmversioninfo|
|
||||
systemramtotal|
|
||||
systemramfreereports|
|
||||
willautorenew
|
||||
|
||||
<CrOSListFieldName> ::=
|
||||
activetimeranges|timeranges|
|
||||
cpustatusreports|
|
||||
devicefiles|
|
||||
diskvolumereports|
|
||||
recentusers|
|
||||
systemramfreereports
|
||||
|
||||
<CrOSOrderByFieldName> ::=
|
||||
lastsync|location|notes|serialnumber|status|supportenddate|user
|
||||
|
||||
@@ -388,8 +400,8 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<MembersFieldName> ::=
|
||||
email|
|
||||
id|
|
||||
name|
|
||||
role|
|
||||
status|
|
||||
type
|
||||
|
||||
<MobileFieldName> ::=
|
||||
@@ -580,9 +592,9 @@ Specify a collection of Users by directly specifying them or by specifiying item
|
||||
(user <UserItem>)|
|
||||
(users <UserList>)|
|
||||
(group|group_ns|group_susp <GroupItem)|
|
||||
(ou|org <OrgUnitPath)|
|
||||
(ou_ns|org_ns <OrgUnitPath)|
|
||||
(ou_susp|org_susp <OrgUnitPath)|
|
||||
(ou|org <OrgUnitPath>)|
|
||||
(ou_ns|org_ns <OrgUnitPath>)|
|
||||
(ou_susp|org_susp <OrgUnitPath>)|
|
||||
(ou_and_children|ou_and_child <OrgUnitPath>)|
|
||||
(ou_and_children_ns|ou_and_child_ns <OrgUnitPath>)|
|
||||
(ou_and_children_susp|ou_and_child_susp <OrgUnitPath>)|
|
||||
@@ -881,8 +893,8 @@ gam delete alias|nickname [user|group|target] <UniqueID>|<EmailAddress>
|
||||
gam info alias|nickname <EmailAddress>
|
||||
gam print aliases|nicknames [todrive] [shownoneditable] [nogroups] [nousers] [(query <QueryUser>)|(queries <QueryUserList)]
|
||||
|
||||
gam calendar <CalendarItem> add <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default
|
||||
gam calendar <CalendarItem> update <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default
|
||||
gam calendar <CalendarItem> add <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications <Boolean>]
|
||||
gam calendar <CalendarItem> update <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications <Boolean>]
|
||||
gam calendar <CalendarItem> del|delete <CalendarACLRole> <EmailAddress>|(domain [<DomainName>])|default
|
||||
gam calendar <CalendarItem> showacl
|
||||
|
||||
@@ -903,8 +915,8 @@ gam info cros <CrOSEntity> [nolists] [listlimit <Number>] [start <Date>] [end <D
|
||||
[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>] [downloadfile latest|<Time>] [targetfolder <FilePath>]
|
||||
|
||||
gam print cros [todrive] [(query <QueryCrOS>)|(queries <QueryCrOSList>)] [limittoou <OrgUnitItem>]
|
||||
[orderby <CrOSOrderByFieldName> [ascending|descending]] [nolists|recentusers|timeranges|devicefiles] [listlimit <Number>] [start <Date>] [end <Date>]
|
||||
[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]
|
||||
[orderby <CrOSOrderByFieldName> [ascending|descending]] [nolists|<CrOSListFieldName>*] [listlimit <Number>] [start <Date>] [end <Date>]
|
||||
[basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>] [sortheaders]
|
||||
gam <CrOSTypeEntity> print
|
||||
|
||||
Summary of printing:
|
||||
@@ -915,22 +927,14 @@ Prints no header row and deviceId for specified CrOS devices.
|
||||
gam print cros ... basic|full
|
||||
Prints a header row and selected fields for specified CrOS devices.
|
||||
|
||||
The basic argument outputs these column headers: deviceId,annotatedAssetId,annotatedLocation,annotatedUser,lastSync,notes,serialNumber,status
|
||||
The allfields/full arguments output all column headers including three headers, recentUsers, activeTimeRanges and deviceFiles,
|
||||
that repeat with two/four/two subvalues each, yielding a large number of columns that make the output hard to process.
|
||||
The nolists argument suppresses these three headers; if you want these headers in a more manageable form use the following arguments.
|
||||
|
||||
If recentusers is specified, for each recent user, the columns recentUsers.email and recentUsers.type are output on a separate row
|
||||
with all of the other headers.
|
||||
|
||||
If timeranges is specified, for each time range entry, the columns activeTimeRanges.date, activeTimeRange.activeTime,
|
||||
activeTimeRanges.duration and activeTimeRanges.minutes are output on a separate row with all of the other headers.
|
||||
|
||||
If devicefiles is specified, for each deviceFile, the columns deviceFiles.type and deviceFiles.createTime are output on a separate row
|
||||
with all of the other headers.
|
||||
The basic argument outputs these column headers: deviceId,annotatedAssetId,annotatedLocation,annotatedUser,lastSync,notes,serialNumber,status.
|
||||
The allfields/full arguments output all column headers including six headers: activeTimeRanges, cpuStatusReports, deviceFiles, diskVolumeReports, recentUsers and systemRamFreeReports
|
||||
that repeat with multiple subvalues each, yielding a large number of columns that make the output hard to process.
|
||||
The nolists argument suppresses these six headers; if you want these headers in a more manageable form specify <CrOSListFieldName> values as desired.
|
||||
One set of values for all <CrOSListFieldName> fields specified will be output on a separate row with all of the other headers.
|
||||
|
||||
The listlimit <Number> argument limits the number of repetitions to <Number>; if not specified or <Number> equals zero, there is no limit.
|
||||
The start <Date> and end <Date> arguments filter the time ranges.
|
||||
The start <Date> and end <Date> arguments constrain activeTimeRanges, cpuStatusReports, deviceFiles and systemRamFreeReports to fall within the specified <Dates>.
|
||||
|
||||
gam print crosactivity [todrive] [(query <QueryCrOS>)|(queries <QueryCrOSList>)] [limittoou <OrgUnitItem>]
|
||||
[recentusers] [timeranges] [both] [devicefiles] [all] [listlimit <Number>] [start <Date>] [end <Date>] [delimiter <Character>]
|
||||
@@ -962,10 +966,10 @@ gam print mobile [todrive] [(query <QueryMobile>)|(queries <QueryMobileList>)] [
|
||||
|
||||
gam create group <EmailAddress> <GroupAttributes>*
|
||||
gam update group <GroupItem> [admincreated <Boolean>] [email <EmailAddress>] <GroupAttributes>*
|
||||
gam update group <GroupItem> add [owner|manager|member] [notsuspended|suspended] <UserTypeEntity>
|
||||
gam update group <GroupItem> add [owner|manager|member] [notsuspended|suspended] [delivery allmail|daily|digest|none|nomail] <UserTypeEntity>
|
||||
gam update group <GroupItem> delete|remove [owner|manager|member] <UserTypeEntity>
|
||||
gam update group <GroupItem> sync [owner|manager|member] [notsuspended|suspended] <UserTypeEntity>
|
||||
gam update group <GroupItem> update [owner|manager|member] <UserTypeEntity>
|
||||
gam update group <GroupItem> sync [owner|manager|member] [notsuspended|suspended] [delivery allmail|daily|digest|none|nomail] <UserTypeEntity>
|
||||
gam update group <GroupItem> update [owner|manager|member] [notsuspended|suspended] [delivery allmail|daily|digest|none|nomail] <UserTypeEntity>
|
||||
gam update group <GroupItem> clear [member] [manager] [owner] [notsuspended|suspended]
|
||||
gam delete group <GroupItem>
|
||||
gam info group <GroupItem> [nousers] [noaliases] [groups]
|
||||
@@ -975,6 +979,7 @@ gam print groups [todrive] ([domain <DomainName>] ([member <UserItem>]|[query <Q
|
||||
[members|memberscount] [managers|managerscount] [owners|ownerscount]
|
||||
[delimiter <Character>] [sortheaders]
|
||||
|
||||
gam info member <UserItem> <GroupItem>
|
||||
gam print group-members|groups-members [todrive]
|
||||
([domain <DomainName>] ([member <UserItem>]|[query <QueryGroup>]))|[group|group_ns|group_susp <GroupItem>] [notsuspended|suspended]
|
||||
[roles <GroupRoleList>] [membernames] [fields <MembersFieldNameList>]
|
||||
@@ -1015,18 +1020,17 @@ gam delete user <UserItem>
|
||||
gam undelete user <UserItem> [org|ou <OrgUnitPath>]
|
||||
gam info user [<UserItem>] [noaliases] [nogroups] [nolicenses|nolicences] [noschemas] [schemas|custom <SchemaNameList>] [userview] [skus|sku <SKUIDList>]
|
||||
|
||||
gam print users [todrive] ([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)] [deleted_only|only_deleted])
|
||||
Print fields for selected users; use domain, query/queries and deleted_only to select users to print;
|
||||
if none of these options are specified, all users are printed.
|
||||
The first column will always be primaryEmail; the remaining field names will be sorted if allfields, basic, full or sortheaders is specified;
|
||||
otherwise, the remaining field names will appear in the order specified.
|
||||
|
||||
gam print users [todrive]
|
||||
([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)] [deleted_only|only_deleted])
|
||||
[groups] [license|licenses|licence|licences] [emailpart|emailparts|username]
|
||||
[orderby <UserOrderByFieldName> [ascending|descending]] [userview]
|
||||
[allfields|basic|full | ((<UserFieldName>* | fields <UserFieldNameList>) [schemas|custom all|<SchemaNameList>])]
|
||||
[delimiter <Character>] [sortheaders]
|
||||
gam <UserTypeEntity> print
|
||||
|
||||
Summary of printing:
|
||||
gam print users
|
||||
Prints a header row and primaryEmail for all users.
|
||||
gam <UserTypeEntity> print
|
||||
Prints no header row and primaryEmail for specified users.
|
||||
|
||||
gam create verify|verification <DomainName>
|
||||
gam update verify|verification <DomainName> cname|txt|text|site|file
|
||||
@@ -1128,7 +1132,7 @@ gam <UserTypeEntity> print calendars [todrive]
|
||||
|
||||
gam <UserTypeEntity> show calsettings
|
||||
gam <UserTypeEntity> update calattendees csv <FileName> [dryrun] [start <Date>] [end <Date>] [allevents]
|
||||
gam <UserTypeEntity> transfer seccals <UserItem> [keepuser]
|
||||
gam <UserTypeEntity> transfer seccals <UserItem> [keepuser] [sendnotifications <Boolean>]
|
||||
|
||||
gam <UserTypeEntity> print|show driveactivity [todrive] [fileid <DriveFileID>] [folderid <DriveFolderID>]
|
||||
gam <UserTypeEntity> print|show drivesettings [todrive]
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
:neworupgrade
|
||||
@echo(
|
||||
@set /p adminemail= "Please enter your G Suite admin email address: "
|
||||
@set /p nu= "Is this a new install or an upgrade? [n or u] "
|
||||
@if /I "%nu%"=="u" (
|
||||
@ echo GAM installation and setup complete!
|
||||
@ goto alldone
|
||||
)
|
||||
@if /I not "%nu%"=="n" (
|
||||
@ echo(
|
||||
@ echo Please answer n or u.
|
||||
@ goto neworupgrade
|
||||
)
|
||||
|
||||
:createproject
|
||||
@echo(
|
||||
@@ -16,10 +26,12 @@
|
||||
@ echo Please answer y or n.
|
||||
@ goto createproject
|
||||
)
|
||||
@echo(
|
||||
@set /p adminemail= "Please enter your G Suite admin email address: "
|
||||
@gam create project %adminemail%
|
||||
@if not ERRORLEVEL 1 goto projectdone
|
||||
@echo(
|
||||
@echo Projection creation failed. Trying again. Say n to skip projection creation.
|
||||
@echo Project creation failed. Trying again. Say n to skip project creation.
|
||||
@goto createproject
|
||||
:projectdone
|
||||
|
||||
|
||||
726
src/gam.py
726
src/gam.py
File diff suppressed because it is too large
Load Diff
11
src/var.py
11
src/var.py
@@ -4,7 +4,7 @@ import platform
|
||||
import re
|
||||
|
||||
gam_author = u'Jay Lee <jay0lee@gmail.com>'
|
||||
gam_version = u'4.61'
|
||||
gam_version = u'4.65'
|
||||
gam_license = u'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
GAM_URL = u'https://git.io/gam'
|
||||
@@ -482,8 +482,10 @@ CROS_ARGUMENT_TO_PROPERTY_MAP = {
|
||||
u'asset': [u'annotatedAssetId',],
|
||||
u'assetid': [u'annotatedAssetId',],
|
||||
u'bootmode': [u'bootMode',],
|
||||
u'cpustatusreports': [u'cpuStatusReports',],
|
||||
u'devicefiles': [u'deviceFiles',],
|
||||
u'deviceid': [u'deviceId',],
|
||||
u'diskvolumereports': [u'diskVolumeReports',],
|
||||
u'ethernetmacaddress': [u'ethernetMacAddress',],
|
||||
u'firmwareversion': [u'firmwareVersion',],
|
||||
u'lastenrollmenttime': [u'lastEnrollmentTime',],
|
||||
@@ -503,6 +505,8 @@ CROS_ARGUMENT_TO_PROPERTY_MAP = {
|
||||
u'serialnumber': [u'serialNumber',],
|
||||
u'status': [u'status',],
|
||||
u'supportenddate': [u'supportEndDate',],
|
||||
u'systemramtotal': [u'systemRamTotal',],
|
||||
u'systemramfreereports': [u'systemRamFreeReports',],
|
||||
u'tag': [u'annotatedAssetId',],
|
||||
u'timeranges': [u'activeTimeRanges.activeTime', u'activeTimeRanges.date'],
|
||||
u'times': [u'activeTimeRanges.activeTime', u'activeTimeRanges.date'],
|
||||
@@ -531,6 +535,7 @@ CROS_SCALAR_PROPERTY_PRINT_ORDER = [
|
||||
u'meid',
|
||||
u'ethernetMacAddress',
|
||||
u'macAddress',
|
||||
u'systemRamTotal',
|
||||
u'lastEnrollmentTime',
|
||||
u'orderNumber',
|
||||
u'supportEndDate',
|
||||
@@ -541,6 +546,10 @@ CROS_SCALAR_PROPERTY_PRINT_ORDER = [
|
||||
CROS_RECENT_USERS_ARGUMENTS = [u'recentusers', u'users']
|
||||
CROS_ACTIVE_TIME_RANGES_ARGUMENTS = [u'timeranges', u'activetimeranges', u'times']
|
||||
CROS_DEVICE_FILES_ARGUMENTS = [u'devicefiles', u'files']
|
||||
CROS_CPU_STATUS_REPORTS_ARGUMENTS = [u'cpustatusreports',]
|
||||
CROS_DISK_VOLUME_REPORTS_ARGUMENTS = [u'diskvolumereports',]
|
||||
CROS_SYSTEM_RAM_FREE_REPORTS_ARGUMENTS = [u'systemramfreereports',]
|
||||
CROS_LISTS_ARGUMENTS = CROS_ACTIVE_TIME_RANGES_ARGUMENTS+CROS_RECENT_USERS_ARGUMENTS+CROS_DEVICE_FILES_ARGUMENTS+CROS_CPU_STATUS_REPORTS_ARGUMENTS+CROS_DISK_VOLUME_REPORTS_ARGUMENTS+CROS_SYSTEM_RAM_FREE_REPORTS_ARGUMENTS
|
||||
CROS_START_ARGUMENTS = [u'start', u'startdate', u'oldestdate']
|
||||
CROS_END_ARGUMENTS = [u'end', u'enddate']
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
GAM 4.65
|
||||
- Manage email delivery settings for group members
|
||||
- Add operatingSystemType to user posix config (Roman)
|
||||
- Handle missing language setting (jalmeroth)
|
||||
- handle mixed case aliases (Ross)
|
||||
- contentmanager and fileorganizer roles in Team Drive (Ross)
|
||||
- various other fixes and optimizations (Jay and Ross)
|
||||
|
||||
GAM 4.61
|
||||
- New Gmail delegation API
|
||||
- Remove "admin" command from user create/update to avoid accidental super admins. Still possible to give super admin rights via "gam create admin" command. (Ross)
|
||||
|
||||
Reference in New Issue
Block a user