mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Compare commits
1 Commits
v7.00.16
...
20241011.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f707c83e1a |
@@ -10,6 +10,11 @@ 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.00.17
|
||||||
|
|
||||||
|
Update all user calendar commands to disable falling back to client access if service account
|
||||||
|
authorization has never been performed.
|
||||||
|
|
||||||
### 7.00.16
|
### 7.00.16
|
||||||
|
|
||||||
Updated `gam <UserTypeEntity> claim|transfer ownership` to show `Got N Drive Files/Folders that matched query` messages
|
Updated `gam <UserTypeEntity> claim|transfer ownership` to show `Got N Drive Files/Folders that matched query` messages
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||||
admin@server:/Users/admin$ gam version
|
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
|
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||||
GAM 7.00.16 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.00.17 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.0 64-bit final
|
Python 3.13.0 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 x86_64
|
||||||
@@ -923,7 +923,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
|
||||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||||
GAM7 7.00.16 - https://github.com/GAM-team/GAM - pythonsource
|
GAM7 7.00.17 - https://github.com/GAM-team/GAM - pythonsource
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.0 64-bit final
|
Python 3.13.0 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Print the current version of Gam with details
|
Print the current version of Gam with details
|
||||||
```
|
```
|
||||||
gam version
|
gam version
|
||||||
GAM 7.00.16 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.00.17 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.0 64-bit final
|
Python 3.13.0 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 x86_64
|
||||||
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07: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.00.16 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.00.17 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.0 64-bit final
|
Python 3.13.0 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 x86_64
|
||||||
@@ -27,7 +27,7 @@ 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.00.16 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.00.17 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.0 64-bit final
|
Python 3.13.0 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 x86_64
|
||||||
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
|
|||||||
Path: /Users/Admin/bin/gam7
|
Path: /Users/Admin/bin/gam7
|
||||||
Version Check:
|
Version Check:
|
||||||
Current: 5.35.08
|
Current: 5.35.08
|
||||||
Latest: 7.00.16
|
Latest: 7.00.17
|
||||||
echo $?
|
echo $?
|
||||||
1
|
1
|
||||||
```
|
```
|
||||||
@@ -72,7 +72,7 @@ echo $?
|
|||||||
Print the current version number without details
|
Print the current version number without details
|
||||||
```
|
```
|
||||||
gam version simple
|
gam version simple
|
||||||
7.00.16
|
7.00.17
|
||||||
```
|
```
|
||||||
In Linux/MacOS you can do:
|
In Linux/MacOS you can do:
|
||||||
```
|
```
|
||||||
@@ -82,7 +82,7 @@ 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.00.16 - https://github.com/GAM-team/GAM
|
GAM 7.00.17 - https://github.com/GAM-team/GAM
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.0 64-bit final
|
Python 3.13.0 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 x86_64
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
7.00.17
|
||||||
|
|
||||||
|
Update all user calendar commands to disable falling back to client access if service account
|
||||||
|
authorization has never been performed.
|
||||||
|
|
||||||
7.00.16
|
7.00.16
|
||||||
|
|
||||||
Updated `gam <UserTypeEntity> claim|transfer ownership` to show `Got N Drive Files/Folders that matched query` messages
|
Updated `gam <UserTypeEntity> claim|transfer ownership` to show `Got N Drive Files/Folders that matched query` messages
|
||||||
|
|||||||
@@ -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.00.16'
|
__version__ = '7.00.17'
|
||||||
__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
|
||||||
@@ -6056,7 +6056,7 @@ def checkGroupExists(cd, ci, ciGroupsAPI, group, i=0, count=0):
|
|||||||
|
|
||||||
# Turn the entity into a list of Users/CrOS devices
|
# Turn the entity into a list of Users/CrOS devices
|
||||||
def getItemsToModify(entityType, entity, memberRoles=None, isSuspended=None, isArchived=None,
|
def getItemsToModify(entityType, entity, memberRoles=None, isSuspended=None, isArchived=None,
|
||||||
groupMemberType=Ent.TYPE_USER, noListConversion=False):
|
groupMemberType=Ent.TYPE_USER, noListConversion=False, recursive=False, noCLArgs=False):
|
||||||
def _incrEntityDoesNotExist(entityType):
|
def _incrEntityDoesNotExist(entityType):
|
||||||
entityError['entityType'] = entityType
|
entityError['entityType'] = entityType
|
||||||
entityError[ENTITY_ERROR_DNE] += 1
|
entityError[ENTITY_ERROR_DNE] += 1
|
||||||
@@ -6227,32 +6227,33 @@ def getItemsToModify(entityType, entity, memberRoles=None, isSuspended=None, isA
|
|||||||
isSuspended = True
|
isSuspended = True
|
||||||
cd = buildGAPIObject(API.DIRECTORY)
|
cd = buildGAPIObject(API.DIRECTORY)
|
||||||
groups = convertEntityToList(entity)
|
groups = convertEntityToList(entity)
|
||||||
includeDerivedMembership = recursive = False
|
includeDerivedMembership = False
|
||||||
domains = []
|
domains = []
|
||||||
rolesSet = set()
|
rolesSet = set()
|
||||||
while Cmd.ArgumentsRemaining():
|
if not noCLArgs:
|
||||||
myarg = getArgument()
|
while Cmd.ArgumentsRemaining():
|
||||||
if myarg in GROUP_ROLES_MAP:
|
myarg = getArgument()
|
||||||
rolesSet.add(GROUP_ROLES_MAP[myarg])
|
if myarg in GROUP_ROLES_MAP:
|
||||||
elif myarg == 'primarydomain':
|
rolesSet.add(GROUP_ROLES_MAP[myarg])
|
||||||
domains.append(GC.Values[GC.DOMAIN])
|
elif myarg == 'primarydomain':
|
||||||
elif myarg == 'domains':
|
domains.append(GC.Values[GC.DOMAIN])
|
||||||
domains.extend(getEntityList(Cmd.OB_DOMAIN_NAME_ENTITY))
|
elif myarg == 'domains':
|
||||||
elif myarg == 'recursive':
|
domains.extend(getEntityList(Cmd.OB_DOMAIN_NAME_ENTITY))
|
||||||
recursive = True
|
elif myarg == 'recursive':
|
||||||
includeDerivedMembership = False
|
recursive = True
|
||||||
elif myarg == 'includederivedmembership':
|
includeDerivedMembership = False
|
||||||
includeDerivedMembership = True
|
elif myarg == 'includederivedmembership':
|
||||||
recursive = False
|
includeDerivedMembership = True
|
||||||
elif entityType == Cmd.ENTITY_GROUP_USERS_SELECT and myarg in SUSPENDED_ARGUMENTS:
|
recursive = False
|
||||||
isSuspended = _getIsSuspended(myarg)
|
elif entityType == Cmd.ENTITY_GROUP_USERS_SELECT and myarg in SUSPENDED_ARGUMENTS:
|
||||||
elif entityType == Cmd.ENTITY_GROUP_USERS_SELECT and myarg in ARCHIVED_ARGUMENTS:
|
isSuspended = _getIsSuspended(myarg)
|
||||||
isArchived = _getIsArchived(myarg)
|
elif entityType == Cmd.ENTITY_GROUP_USERS_SELECT and myarg in ARCHIVED_ARGUMENTS:
|
||||||
elif myarg == 'end':
|
isArchived = _getIsArchived(myarg)
|
||||||
break
|
elif myarg == 'end':
|
||||||
else:
|
break
|
||||||
Cmd.Backup()
|
else:
|
||||||
missingArgumentExit('end')
|
Cmd.Backup()
|
||||||
|
missingArgumentExit('end')
|
||||||
if rolesSet:
|
if rolesSet:
|
||||||
memberRoles = ','.join(sorted(rolesSet))
|
memberRoles = ','.join(sorted(rolesSet))
|
||||||
for group in groups:
|
for group in groups:
|
||||||
@@ -6293,19 +6294,19 @@ def getItemsToModify(entityType, entity, memberRoles=None, isSuspended=None, isA
|
|||||||
elif entityType in {Cmd.ENTITY_CIGROUP_USERS}:
|
elif entityType in {Cmd.ENTITY_CIGROUP_USERS}:
|
||||||
ci = buildGAPIObject(API.CLOUDIDENTITY_GROUPS)
|
ci = buildGAPIObject(API.CLOUDIDENTITY_GROUPS)
|
||||||
groups = convertEntityToList(entity)
|
groups = convertEntityToList(entity)
|
||||||
recursive = False
|
|
||||||
rolesSet = set()
|
rolesSet = set()
|
||||||
while Cmd.ArgumentsRemaining():
|
if not noCLArgs:
|
||||||
myarg = getArgument()
|
while Cmd.ArgumentsRemaining():
|
||||||
if myarg in GROUP_ROLES_MAP:
|
myarg = getArgument()
|
||||||
rolesSet.add(GROUP_ROLES_MAP[myarg])
|
if myarg in GROUP_ROLES_MAP:
|
||||||
elif myarg == 'recursive':
|
rolesSet.add(GROUP_ROLES_MAP[myarg])
|
||||||
recursive = True
|
elif myarg == 'recursive':
|
||||||
elif myarg == 'end':
|
recursive = True
|
||||||
break
|
elif myarg == 'end':
|
||||||
else:
|
break
|
||||||
Cmd.Backup()
|
else:
|
||||||
missingArgumentExit('end')
|
Cmd.Backup()
|
||||||
|
missingArgumentExit('end')
|
||||||
if rolesSet:
|
if rolesSet:
|
||||||
memberRoles = ','.join(sorted(rolesSet))
|
memberRoles = ','.join(sorted(rolesSet))
|
||||||
for group in groups:
|
for group in groups:
|
||||||
@@ -37028,11 +37029,13 @@ def checkCalendarExists(cal, calId, showMessage=False):
|
|||||||
entityActionFailedWarning([Ent.CALENDAR, calId], str(e))
|
entityActionFailedWarning([Ent.CALENDAR, calId], str(e))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def validateCalendar(calId, i=0, count=0):
|
def validateCalendar(calId, i=0, count=0, noClientAccess=False):
|
||||||
cal = None
|
cal = None
|
||||||
if not calId.endswith('.calendar.google.com'):
|
if not calId.endswith('.calendar.google.com'):
|
||||||
calId, cal = buildGAPIServiceObject(API.CALENDAR, calId, i, count, displayError=False)
|
calId, cal = buildGAPIServiceObject(API.CALENDAR, calId, i, count, displayError=noClientAccess)
|
||||||
if not cal:
|
if not cal:
|
||||||
|
if noClientAccess:
|
||||||
|
return (calId, None)
|
||||||
cal = buildGAPIObject(API.CALENDAR)
|
cal = buildGAPIObject(API.CALENDAR)
|
||||||
try:
|
try:
|
||||||
callGAPI(cal.calendars(), 'get',
|
callGAPI(cal.calendars(), 'get',
|
||||||
@@ -49759,7 +49762,7 @@ def _validateUserGetCalendarIds(user, i, count, calendarEntity,
|
|||||||
calIds = calendarEntity['dict'][user][:]
|
calIds = calendarEntity['dict'][user][:]
|
||||||
else:
|
else:
|
||||||
calIds = calendarEntity['list'][:]
|
calIds = calendarEntity['list'][:]
|
||||||
user, cal = validateCalendar(user, i, count)
|
user, cal = validateCalendar(user, i, count, noClientAccess=True)
|
||||||
if not cal:
|
if not cal:
|
||||||
return (user, None, None, 0)
|
return (user, None, None, 0)
|
||||||
if calendarEntity['resourceIds']:
|
if calendarEntity['resourceIds']:
|
||||||
@@ -50178,7 +50181,7 @@ def printShowCalendars(users):
|
|||||||
i, count, users = getEntityArgument(users)
|
i, count, users = getEntityArgument(users)
|
||||||
for user in users:
|
for user in users:
|
||||||
i += 1
|
i += 1
|
||||||
user, cal = validateCalendar(user, i, count)
|
user, cal = validateCalendar(user, i, count, noClientAccess=True)
|
||||||
if not cal:
|
if not cal:
|
||||||
continue
|
continue
|
||||||
if csvPF:
|
if csvPF:
|
||||||
@@ -50278,7 +50281,7 @@ def printShowCalSettings(users):
|
|||||||
i, count, users = getEntityArgument(users)
|
i, count, users = getEntityArgument(users)
|
||||||
for user in users:
|
for user in users:
|
||||||
i += 1
|
i += 1
|
||||||
user, cal = validateCalendar(user, i, count)
|
user, cal = validateCalendar(user, i, count, noClientAccess=True)
|
||||||
if not cal:
|
if not cal:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
@@ -50438,7 +50441,7 @@ def transferCalendars(users):
|
|||||||
_getCalendarAttributes(targetListBody, returnOnUnknownArgument=True)
|
_getCalendarAttributes(targetListBody, returnOnUnknownArgument=True)
|
||||||
else:
|
else:
|
||||||
unknownArgumentExit()
|
unknownArgumentExit()
|
||||||
targetUser, targetCal = validateCalendar(targetUser)
|
targetUser, targetCal = validateCalendar(targetUser, noClientAccess=True)
|
||||||
if not targetCal:
|
if not targetCal:
|
||||||
return
|
return
|
||||||
colorRgbFormat = 'backgroundColor' in targetListBody or 'foregroundColor' in targetListBody
|
colorRgbFormat = 'backgroundColor' in targetListBody or 'foregroundColor' in targetListBody
|
||||||
|
|||||||
Reference in New Issue
Block a user