diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 99950588..3586484e 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,10 @@ +7.02.11 + +Updated `gam report ` to display `id:` in the `emailAddress` column +when `actor.email` is empty. This typically occurs when the actor is not in your workspace. + +Updated `gam copy drivefile` to ignore ACLs referencing deleted user/groups. + 7.02.10 Added option `bydate` to `gam report ... countsonly` that provides an additional display option. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index bae7b496..2f092fcf 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.02.10' +__version__ = '7.02.11' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -14185,7 +14185,9 @@ def doReport(): accessErrorExit(None) for activity in feed: events = activity.pop('events') - actor = activity['actor'].get('email', activity['actor'].get('key', UNKNOWN)) + actor = activity['actor'].get('email') + if not actor: + actor = 'id:'+activity['actor'].get('profileId', UNKNOWN) if showOrgUnit: activity['actor']['orgUnitPath'] = userOrgUnits.get(actor, UNKNOWN) if countsOnly and countsByDate: @@ -59105,8 +59107,8 @@ def _copyPermissions(drive, user, i, count, j, jcount, notCopiedMessage = f'domain {domain} excluded' elif domain and copyMoveOptions['includePermissionsFromDomains'] and domain not in copyMoveOptions['includePermissionsFromDomains']: notCopiedMessage = f'domain {domain} not included' - elif permission.pop('deleted', False): - notCopiedMessage = f"{permission['type']} {permission['emailAddress']} deleted" + elif permission.pop('deleted', False) or (permission['type'] in {'group', 'user'} and not emailAddress): + notCopiedMessage = f"{permission['type']} deleted or has blank email address" elif ((copyInherited == 'copySheetProtectedRangesInheritedPermissions' and copyMoveOptions[copyInherited]) or (copyNonInherited == 'copySheetProtectedRangesNonInheritedPermissions' and copyMoveOptions[copyNonInherited] != COPY_NONINHERITED_PERMISSIONS_NEVER)):