mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61735701b3 | ||
|
|
c60ef582be | ||
|
|
cd8c43a0cc | ||
|
|
7582c42eff | ||
|
|
d9a75af87c | ||
|
|
6c443fa0c6 | ||
|
|
b6a9229a67 | ||
|
|
84175ba80d | ||
|
|
56c2b77f25 |
@@ -10,13 +10,13 @@ authors = [
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow==1.4.0",
|
"arrow==1.4.0",
|
||||||
"chardet==7.4.3",
|
"chardet==7.4.3",
|
||||||
"cryptography==47.0.0",
|
"cryptography==48.0.0",
|
||||||
"distro==1.9.0 ; sys_platform=='linux'",
|
"distro==1.9.0 ; sys_platform=='linux'",
|
||||||
"filelock==3.29.0",
|
"filelock==3.29.0",
|
||||||
"google-api-python-client==2.195.0",
|
"google-api-python-client==2.196.0",
|
||||||
"google-auth-httplib2==0.3.1",
|
"google-auth-httplib2==0.4.0",
|
||||||
"google-auth-oauthlib==1.3.1",
|
"google-auth-oauthlib==1.4.0",
|
||||||
"google-auth==2.50.0",
|
"google-auth==2.52.0",
|
||||||
"httplib2==0.31.2",
|
"httplib2==0.31.2",
|
||||||
"lxml==6.1.0",
|
"lxml==6.1.0",
|
||||||
"passlib==1.7.4",
|
"passlib==1.7.4",
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
7.43.09
|
||||||
|
|
||||||
|
Fixed bug in `gam <UserTypeEntity> print filelist` that caused a trap.
|
||||||
|
|
||||||
|
7.43.08
|
||||||
|
|
||||||
|
Fixed bug and formatting issues in `gam info device <DeviceEntity>`.
|
||||||
|
|
||||||
|
7.43.07
|
||||||
|
|
||||||
|
Improved validation of `<QueryCrOS>`, `<QueryDevice>` and `<QueryMobile>`.
|
||||||
|
|
||||||
7.43.06
|
7.43.06
|
||||||
|
|
||||||
Updated commands that use `<QueryCrOS>`, `<QueryDevice>` or `<QueryMobile>` to validate
|
Updated commands that use `<QueryCrOS>`, `<QueryDevice>` or `<QueryMobile>` to validate
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||||
__version__ = '7.43.06'
|
__version__ = '7.43.09'
|
||||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
# pylint: disable=wrong-import-position
|
# pylint: disable=wrong-import-position
|
||||||
@@ -6072,7 +6072,13 @@ def getQueries(myarg):
|
|||||||
return shlexSplitList(getString(Cmd.OB_QUERY_LIST))
|
return shlexSplitList(getString(Cmd.OB_QUERY_LIST))
|
||||||
|
|
||||||
def _validateDeviceQuery(entityType, query):
|
def _validateDeviceQuery(entityType, query):
|
||||||
if (':' not in query) or ('?' in query):
|
if ':' in query:
|
||||||
|
qfield, qvalue = query.split(':', 1)
|
||||||
|
qfield = qfield.strip()
|
||||||
|
else:
|
||||||
|
qfield = ''
|
||||||
|
qvalue = query
|
||||||
|
if (not qfield) or (not qvalue) or ('?' in query):
|
||||||
Cmd.Backup()
|
Cmd.Backup()
|
||||||
usageErrorExit(Msg.INVALID_DEVICE_QUERY.format(Ent.Singular(entityType), query))
|
usageErrorExit(Msg.INVALID_DEVICE_QUERY.format(Ent.Singular(entityType), query))
|
||||||
|
|
||||||
@@ -29167,7 +29173,7 @@ def doInfoChatMessage():
|
|||||||
# [formatjson [quotechar <Character>]]
|
# [formatjson [quotechar <Character>]]
|
||||||
def printShowChatMessages(users):
|
def printShowChatMessages(users):
|
||||||
cd = buildGAPIObject(API.DIRECTORY)
|
cd = buildGAPIObject(API.DIRECTORY)
|
||||||
csvPF = CSVPrintFile(['User', 'space.name', 'space.displayName', 'name'] if not isinstance(users, list) else ['space.name', 'space.displayName', 'name']) if Act.csvFormat() else None
|
csvPF = CSVPrintFile(['User', 'space.name', 'space.displayName', 'name']) if Act.csvFormat() else None
|
||||||
FJQC = FormatJSONQuoteChar(csvPF)
|
FJQC = FormatJSONQuoteChar(csvPF)
|
||||||
fieldsList = []
|
fieldsList = []
|
||||||
pfilter = None
|
pfilter = None
|
||||||
@@ -29295,7 +29301,7 @@ def doInfoChatEvent():
|
|||||||
# filter <String>
|
# filter <String>
|
||||||
# [formatjson [quotechar <Character>]]
|
# [formatjson [quotechar <Character>]]
|
||||||
def printShowChatEvents(users):
|
def printShowChatEvents(users):
|
||||||
csvPF = CSVPrintFile(['User', 'space.name', 'space.displayName', 'name'] if not isinstance(users, list) else ['space.name', 'space.displayName', 'name']) if Act.csvFormat() else None
|
csvPF = CSVPrintFile(['User', 'space.name', 'space.displayName', 'name']) if Act.csvFormat() else None
|
||||||
FJQC = FormatJSONQuoteChar(csvPF)
|
FJQC = FormatJSONQuoteChar(csvPF)
|
||||||
pfilter = None
|
pfilter = None
|
||||||
parentList = []
|
parentList = []
|
||||||
@@ -31087,7 +31093,7 @@ def getCIDeviceUserEntity():
|
|||||||
pageMessage = getPageMessage()
|
pageMessage = getPageMessage()
|
||||||
try:
|
try:
|
||||||
deviceUsers = callGAPIpages(ci.devices().deviceUsers(), 'list', 'deviceUsers',
|
deviceUsers = callGAPIpages(ci.devices().deviceUsers(), 'list', 'deviceUsers',
|
||||||
throwReasons=[GAPI.INVALID, GAPI.PERMISSION_DENIED],
|
throwReasons=[GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
||||||
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
pageMessage=pageMessage,
|
pageMessage=pageMessage,
|
||||||
customer=customer, filter=query, parent='devices/-',
|
customer=customer, filter=query, parent='devices/-',
|
||||||
@@ -31096,7 +31102,7 @@ def getCIDeviceUserEntity():
|
|||||||
except GAPI.invalid:
|
except GAPI.invalid:
|
||||||
Cmd.Backup()
|
Cmd.Backup()
|
||||||
usageErrorExit(Msg.INVALID_QUERY)
|
usageErrorExit(Msg.INVALID_QUERY)
|
||||||
except GAPI.permissionDenied as e:
|
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||||
entityActionFailedWarning([Ent.DEVICE_USER, None], str(e))
|
entityActionFailedWarning([Ent.DEVICE_USER, None], str(e))
|
||||||
return ([], ci, customer, False)
|
return ([], ci, customer, False)
|
||||||
|
|
||||||
@@ -31450,7 +31456,7 @@ def doInfoCIDevice():
|
|||||||
else:
|
else:
|
||||||
FJQC.GetFormatJSON(myarg)
|
FJQC.GetFormatJSON(myarg)
|
||||||
fields = getFieldsFromFieldsList(fieldsList)
|
fields = getFieldsFromFieldsList(fieldsList)
|
||||||
userFields = getFieldsFromFieldsList(userFieldsList)
|
userFields = getItemFieldsFromFieldsList('deviceUsers', userFieldsList)
|
||||||
i = 0
|
i = 0
|
||||||
count = len(entityList)
|
count = len(entityList)
|
||||||
for device in entityList:
|
for device in entityList:
|
||||||
@@ -31462,7 +31468,7 @@ def doInfoCIDevice():
|
|||||||
name=name, customer=customer, fields=fields)
|
name=name, customer=customer, fields=fields)
|
||||||
if getDeviceUsers:
|
if getDeviceUsers:
|
||||||
device_users = callGAPIpages(ci.devices().deviceUsers(), 'list', 'deviceUsers',
|
device_users = callGAPIpages(ci.devices().deviceUsers(), 'list', 'deviceUsers',
|
||||||
throwReasons=[GAPI.INVALID, GAPI.PERMISSION_DENIED],
|
throwReasons=[GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
||||||
parent=name, customer=customer, fields=userFields)
|
parent=name, customer=customer, fields=userFields)
|
||||||
for device_user in device_users:
|
for device_user in device_users:
|
||||||
device_user['client_states'] = callGAPIpages(ci.devices().deviceUsers().clientStates(), 'list', 'clientStates',
|
device_user['client_states'] = callGAPIpages(ci.devices().deviceUsers().clientStates(), 'list', 'clientStates',
|
||||||
@@ -31486,7 +31492,7 @@ def doInfoCIDevice():
|
|||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
showJSON(None, device_user, timeObjects=DEVICE_TIME_OBJECTS)
|
showJSON(None, device_user, timeObjects=DEVICE_TIME_OBJECTS)
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
except GAPI.notFound:
|
except GAPI.notFound:
|
||||||
entityUnknownWarning(Ent.DEVICE, f'{name}')
|
entityUnknownWarning(Ent.DEVICE, f'{name}')
|
||||||
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||||
@@ -31812,7 +31818,7 @@ def doPrintCIDeviceUsers():
|
|||||||
csvPF.WriteRowNoFilter({'name': deviceUser['name'],
|
csvPF.WriteRowNoFilter({'name': deviceUser['name'],
|
||||||
'JSON': json.dumps(cleanJSON(deviceUser, timeObjects=DEVICE_TIME_OBJECTS),
|
'JSON': json.dumps(cleanJSON(deviceUser, timeObjects=DEVICE_TIME_OBJECTS),
|
||||||
ensure_ascii=False, sort_keys=True)})
|
ensure_ascii=False, sort_keys=True)})
|
||||||
except (GAPI.invalid, GAPI.permissionDenied) as e:
|
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||||
entityActionFailedWarning([Ent.DEVICE_USER, None], str(e))
|
entityActionFailedWarning([Ent.DEVICE_USER, None], str(e))
|
||||||
break
|
break
|
||||||
if showItemCountOnly:
|
if showItemCountOnly:
|
||||||
@@ -59699,7 +59705,7 @@ def printFileList(users):
|
|||||||
(DLP.onlySharedDrives and not driveId)):
|
(DLP.onlySharedDrives and not driveId)):
|
||||||
return
|
return
|
||||||
if getCheckFilePermissions:
|
if getCheckFilePermissions:
|
||||||
if not incrementalPrint:
|
if buildTree and not incrementalPrint:
|
||||||
getSharedDriveACLsCount += 1
|
getSharedDriveACLsCount += 1
|
||||||
if getSharedDriveACLsCount % 100 == 0:
|
if getSharedDriveACLsCount % 100 == 0:
|
||||||
writeStderr(f'{Msg.GOT} {getSharedDriveACLsCount} {Ent.Plural(Ent.DRIVE_FILE_OR_FOLDER_ACL)} {Msg.FOR} {gettingEntity}\n')
|
writeStderr(f'{Msg.GOT} {getSharedDriveACLsCount} {Ent.Plural(Ent.DRIVE_FILE_OR_FOLDER_ACL)} {Msg.FOR} {gettingEntity}\n')
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ INVALID_ALIAS = 'Invalid Alias'
|
|||||||
INVALID_ATTENDEE_CHANGE = 'Invalid attendee change "{0}"'
|
INVALID_ATTENDEE_CHANGE = 'Invalid attendee change "{0}"'
|
||||||
INVALID_CHARSET = 'Invalid charset "{0}"'
|
INVALID_CHARSET = 'Invalid charset "{0}"'
|
||||||
INVALID_DATE_TIME_RANGE = '{0} {1} must be greater than/equal to {2} {3}'
|
INVALID_DATE_TIME_RANGE = '{0} {1} must be greater than/equal to {2} {3}'
|
||||||
INVALID_DEVICE_QUERY = 'Invalid {0} query "{1}"; it must contain a ":" and must not contain a "?"'
|
INVALID_DEVICE_QUERY = 'Invalid {0} query "{1}"; it must be if the form "field:value" and must not contain a "?"'
|
||||||
INVALID_EMOJI_NAME = '{0} does not match pattern :[0-9a-z_-]:'
|
INVALID_EMOJI_NAME = '{0} does not match pattern :[0-9a-z_-]:'
|
||||||
INVALID_ENTITY = 'Invalid {0}, {1}'
|
INVALID_ENTITY = 'Invalid {0}, {1}'
|
||||||
INVALID_EVENT_TIMERANGE = '{0} {1} must be less than {2}'
|
INVALID_EVENT_TIMERANGE = '{0} {1} must be less than {2}'
|
||||||
|
|||||||
@@ -10,6 +10,18 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
|||||||
|
|
||||||
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||||
|
|
||||||
|
### 7.43.09
|
||||||
|
|
||||||
|
Fixed bug in `gam <UserTypeEntity> print filelist` that caused a trap.
|
||||||
|
|
||||||
|
### 7.43.08
|
||||||
|
|
||||||
|
Fixed bug and formatting issues in `gam info device <DeviceEntity>`.
|
||||||
|
|
||||||
|
### 7.43.07
|
||||||
|
|
||||||
|
Improved validation of `<QueryCrOS>`, `<QueryDevice>` and `<QueryMobile>`.
|
||||||
|
|
||||||
### 7.43.06
|
### 7.43.06
|
||||||
|
|
||||||
Updated commands that use `<QueryCrOS>`, `<QueryDevice>` or `<QueryMobile>` to validate
|
Updated commands that use `<QueryCrOS>`, `<QueryDevice>` or `<QueryMobile>` to validate
|
||||||
|
|||||||
@@ -251,10 +251,10 @@ writes the credentials into the file oauth2.txt.
|
|||||||
```
|
```
|
||||||
gamteam@server:/Users/gamteam$ rm -f /Users/gamteam/GAMConfig/oauth2.txt
|
gamteam@server:/Users/gamteam$ rm -f /Users/gamteam/GAMConfig/oauth2.txt
|
||||||
gamteam@server:/Users/gamteam$ gam version
|
gamteam@server:/Users/gamteam$ gam version
|
||||||
GAM 7.43.06 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.43.09 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.14.4 64-bit final
|
Python 3.14.4 64-bit final
|
||||||
macOS Tahoe 26.4.1 arm64
|
macOS Tahoe 26.5 arm64
|
||||||
Path: /Users/gamteam/bin/gam7
|
Path: /Users/gamteam/bin/gam7
|
||||||
Config File: /Users/gamteam/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
Config File: /Users/gamteam/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||||
|
|
||||||
@@ -1034,7 +1034,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
```
|
```
|
||||||
C:\>del C:\GAMConfig\oauth2.txt
|
C:\>del C:\GAMConfig\oauth2.txt
|
||||||
C:\>gam version
|
C:\>gam version
|
||||||
GAM 7.43.06 - https://github.com/GAM-team/GAM - pythonsource
|
GAM 7.43.09 - https://github.com/GAM-team/GAM - pythonsource
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.14.4 64-bit final
|
Python 3.14.4 64-bit final
|
||||||
Windows 11 10.0.26200 AMD64
|
Windows 11 10.0.26200 AMD64
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
Print the current version of Gam with details
|
Print the current version of Gam with details
|
||||||
```
|
```
|
||||||
gam version
|
gam version
|
||||||
GAM 7.43.06 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.43.09 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.14.4 64-bit final
|
Python 3.14.4 64-bit final
|
||||||
macOS Tahoe 26.4.1 arm64
|
macOS Tahoe 26.5 arm64
|
||||||
Path: /Users/gamteam/bin/gam7
|
Path: /Users/gamteam/bin/gam7
|
||||||
Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||||
Time: 2026-02-15T07:51:00-08:00
|
Time: 2026-02-15T07:51:00-08:00
|
||||||
@@ -15,10 +15,10 @@ Time: 2026-02-15T07:51:00-08:00
|
|||||||
Print the current version of Gam with details and time offset information
|
Print the current version of Gam with details and time offset information
|
||||||
```
|
```
|
||||||
gam version timeoffset
|
gam version timeoffset
|
||||||
GAM 7.43.06 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.43.09 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.14.4 64-bit final
|
Python 3.14.4 64-bit final
|
||||||
macOS Tahoe 26.4.1 arm64
|
macOS Tahoe 26.5 arm64
|
||||||
Path: /Users/gamteam/bin/gam7
|
Path: /Users/gamteam/bin/gam7
|
||||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||||
Your system time differs from www.googleapis.com by less than 1 second
|
Your system time differs from www.googleapis.com by less than 1 second
|
||||||
@@ -27,10 +27,10 @@ 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
|
Print the current version of Gam with extended details and SSL information
|
||||||
```
|
```
|
||||||
gam version extended
|
gam version extended
|
||||||
GAM 7.43.06 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.43.09 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.14.4 64-bit final
|
Python 3.14.4 64-bit final
|
||||||
macOS Tahoe 26.4.1 arm64
|
macOS Tahoe 26.5 arm64
|
||||||
Path: /Users/gamteam/bin/gam7
|
Path: /Users/gamteam/bin/gam7
|
||||||
Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||||
Time: 2026-02-15T07:51:00-08:00
|
Time: 2026-02-15T07:51:00-08:00
|
||||||
@@ -68,7 +68,7 @@ MacOS High Sierra 10.13.6 x86_64
|
|||||||
Path: /Users/gamteam/bin/gam7
|
Path: /Users/gamteam/bin/gam7
|
||||||
Version Check:
|
Version Check:
|
||||||
Current: 5.35.08
|
Current: 5.35.08
|
||||||
Latest: 7.43.06
|
Latest: 7.43.09
|
||||||
echo $?
|
echo $?
|
||||||
1
|
1
|
||||||
```
|
```
|
||||||
@@ -76,7 +76,7 @@ echo $?
|
|||||||
Print the current version number without details
|
Print the current version number without details
|
||||||
```
|
```
|
||||||
gam version simple
|
gam version simple
|
||||||
7.43.06
|
7.43.09
|
||||||
```
|
```
|
||||||
In Linux/MacOS you can do:
|
In Linux/MacOS you can do:
|
||||||
```
|
```
|
||||||
@@ -86,10 +86,10 @@ echo $VER
|
|||||||
Print the current version of Gam and address of this Wiki
|
Print the current version of Gam and address of this Wiki
|
||||||
```
|
```
|
||||||
gam help
|
gam help
|
||||||
GAM 7.43.06 - https://github.com/GAM-team/GAM
|
GAM 7.43.09 - https://github.com/GAM-team/GAM
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.14.4 64-bit final
|
Python 3.14.4 64-bit final
|
||||||
macOS Tahoe 26.4.1 arm64
|
macOS Tahoe 26.5 arm64
|
||||||
Path: /Users/gamteam/bin/gam7
|
Path: /Users/gamteam/bin/gam7
|
||||||
Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||||
Time: 2026-02-15T07:51:00-08:00
|
Time: 2026-02-15T07:51:00-08:00
|
||||||
|
|||||||
Reference in New Issue
Block a user