Added option addcsvdata <FieldName> <String> to commands that print calendar acsl

This commit is contained in:
Ross Scroggs
2023-09-03 19:16:56 -07:00
parent 451d945095
commit 34e42a1076
9 changed files with 99 additions and 27 deletions

View File

@@ -8,6 +8,7 @@
- [Create an administrator](#create-an-administrator) - [Create an administrator](#create-an-administrator)
- [Delete an administrator](#delete-an-administrator) - [Delete an administrator](#delete-an-administrator)
- [Display administrators](#display-administrators) - [Display administrators](#display-administrators)
- [Copy roles from one administrator to another](#copy-roles-from-one-administrator-to-another)
## Administrator roles documentation ## Administrator roles documentation
* https://support.google.com/a/answer/33325?ref_topic=4514341 * https://support.google.com/a/answer/33325?ref_topic=4514341
@@ -856,6 +857,7 @@ gam show adminroles|roles [todrive <ToDriveAttribute>*] [privileges]
* `privileges` - Display privileges associated with each role * `privileges` - Display privileges associated with each role
## Create an administrator ## Create an administrator
Add an administrator role to an administrator.
``` ```
gam create admin <EmailAddress>|<UniqueID> <RoleItem> customer|(org_unit <OrgUnitItem>) gam create admin <EmailAddress>|<UniqueID> <RoleItem> customer|(org_unit <OrgUnitItem>)
[condition securitygroup|nonsecuritygroup] [condition securitygroup|nonsecuritygroup]
@@ -868,6 +870,7 @@ The option `condition` limits the conditions for delegate admin access. This cur
* `condition nonsecuritygroup` - limit the delegated admin to managing non-security groups * `condition nonsecuritygroup` - limit the delegated admin to managing non-security groups
## Delete an administrator ## Delete an administrator
Remove an administrator role from an administrator.
``` ```
gam delete admin <RoleAssignmentId> gam delete admin <RoleAssignmentId>
``` ```
@@ -888,3 +891,15 @@ options to limit the display:
In versions prior to 6.07.01, specification of both `user <UserItem>` In versions prior to 6.07.01, specification of both `user <UserItem>`
and `role <RoleItem>` generated no output due to an undocumented API rule that disallows both. and `role <RoleItem>` generated no output due to an undocumented API rule that disallows both.
## Copy roles from one administrator to another
Get roles for current admin.
```
gam redirect csv ./CurrentAdminRoles.csv print admins user currentadmin@domain.com
```
Add roles to new admin.
```
gam config csv_input_row_filter "scopeType:regex:CUSTOMER" redirect stdout ./UpdateNewAdminCustomerRoles.txt multiprocess redirect stderr stdout csv CurrentAdminRoles.csv gam create admin newadmin@domain.com "id:~~roleId~~" customer
gam config csv_input_row_filter "scopeType:regex:ORG_UNIT" redirect stdout ./UpdateNewAdminOrgUnitRoles.txt multiprocess redirect stderr stdout csv CurrentAdminRoles.csv gam create admin newadmin@domain.com "id:~~roleId~~" org_unit "id:~~orgUnitId~~"
```

View File

@@ -232,8 +232,11 @@ Create a new project to create and download two files: `client_secrets.json` for
On-screen instructions lead you through the process. On-screen instructions lead you through the process.
An existing project, `GAM Project Creation`, is used to create your GAM project. The initial instructions tell you how to An existing project, `GAM Project Creation`, is used to create your GAM project. The initial instructions tell you how to
enable this project as a trusted app as your workspace may not allow untrusted third-party apps. You can skip these steps enable this project as a trusted app as your workspace may not allow untrusted third-party apps.
if you know that untrusted third-party apps are allowed. This is recommended but not mandatory unless your workspace has "Google Cloud" service restricted:
* https://support.google.com/a/answer/7281227?hl=en#zippy=%2Crestrict-or-unrestrict-google-services
If it is restricted and you complete this step it may take an hour or so to take full affect and allow you to approve GAM project creation.
The final instructions tell you how to enable your new GAM project as a trusted app as your workspace may not allow untrusted third-party apps. The final instructions tell you how to enable your new GAM project as a trusted app as your workspace may not allow untrusted third-party apps.
You can skip these steps if you know that untrusted third-party apps are allowed. You can skip these steps if you know that untrusted third-party apps are allowed.

View File

@@ -57,11 +57,14 @@ By default, Gam displays the information as an indented list of keys and values.
* `formatjson` - Display the fields in JSON format. * `formatjson` - Display the fields in JSON format.
``` ```
gam calendars <CalendarEntity> print acls|calendaracls [todrive <ToDriveAttribute>*] gam calendars <CalendarEntity> print acls|calendaracls [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
``` ```
Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner. Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner.
Add additional columns of data from the command line to the output
* `addcsvdata <FieldName> <String>`
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
@@ -75,7 +78,9 @@ gam calendar <CalendarEntity> add <CalendarACLRole> ([user] <EmailAddress>)|(gro
gam calendar <CalendarEntity> update <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications <Boolean>] gam calendar <CalendarEntity> update <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications <Boolean>]
gam calendar <CalendarEntity> delete [<CalendarACLRole>] ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default gam calendar <CalendarEntity> delete [<CalendarACLRole>] ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default
gam calendar <CalendarEntity> showacl [formatjson] gam calendar <CalendarEntity> showacl [formatjson]
gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
(addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]]
``` ```
By default, when you add or update a calendar ACL, notification is sent to the members referenced in the `<CalendarACLScopeEntity>`. By default, when you add or update a calendar ACL, notification is sent to the members referenced in the `<CalendarACLScopeEntity>`.
Use `sendnotifications false` to suppress sending the notification. Use `sendnotifications false` to suppress sending the notification.

View File

@@ -12,6 +12,17 @@ See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Win
### 6.63.10 ### 6.63.10
Added option `addcsvdata <FieldName> <String>` to these commands. This adds additional columns of data to the CSV file output
when the `csv` option is used. If a CSV file of calendar information is being used to specify the calenders, fields, e.g., summary
can be added to the ACL output file.
```
gam <UserTypeEntity> print calendaracls <UserCalendarEntity>
gam resource <ResourceID> print calendaracls
gam resources <ResourceEntity> print calendaracls
gam calendar <CalendarEntity> printacl
gam calendars <CalendarEntity> print acls
```
Added commands to show the number of CrOS devices or Users in an entity. Added commands to show the number of CrOS devices or Users in an entity.
``` ```
gam <CrOSTypeEntity> show count gam <CrOSTypeEntity> show count

View File

@@ -274,11 +274,14 @@ By default, Gam displays the information as an indented list of keys and values.
* `formatjson` - Display the fields in JSON format. * `formatjson` - Display the fields in JSON format.
``` ```
gam resources <ResourceEntity> print acls|calendaracls [todrive <ToDriveAttribute>*] gam resources <ResourceEntity> print acls|calendaracls [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
``` ```
Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner. Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner.
Add additional columns of data from the command line to the output
* `addcsvdata <FieldName> <String>`
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format, By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
* `formatjson` - Display the fields in JSON format. * `formatjson` - Display the fields in JSON format.

View File

@@ -117,11 +117,14 @@ By default, Gam displays the information as an indented list of keys and values.
* `formatjson` - Display the fields in JSON format. * `formatjson` - Display the fields in JSON format.
``` ```
gam <UserTypeEntity> print calendaracls <UserCalendarEntity> [todrive <ToDriveAttribute>*] gam <UserTypeEntity> print calendaracls <UserCalendarEntity> [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
``` ```
Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner. Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner.
Add additional columns of data from the command line to the output
* `addcsvdata <FieldName> <String>`
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.

View File

@@ -1530,7 +1530,7 @@ gam calendars <CalendarEntity> show acls|calendaracls
[noselfowner] [noselfowner]
[formatjson] [formatjson]
gam calendars <CalendarEntity> print acls|calendaracls [todrive <ToDriveAttribute>*] gam calendars <CalendarEntity> print acls|calendaracls [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
gam calendar <CalendarEntity> create|add <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications <Boolean>] gam calendar <CalendarEntity> create|add <CalendarACLRole> ([user] <EmailAddress>)|(group <EmailAddress>)|(domain [<DomainName>])|default [sendnotifications <Boolean>]
@@ -1540,7 +1540,7 @@ gam calendar <CalendarEntity> showacl
[noselfowner] [noselfowner]
[formatjson] [formatjson]
gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*] gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
<AttendeeAttendance> ::= optional|required <AttendeeAttendance> ::= optional|required
@@ -4322,7 +4322,7 @@ gam resource <ResourceID> show acls|calendaracls
[noselfowner] [noselfowner]
[formatjson] [formatjson]
gam resource <ResourceID> print acls|calendaracls [todrive <ToDriveAttribute>*] gam resource <ResourceID> print acls|calendaracls [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
gam resources <ResourceEntity> create|add acls|calendaracls <CalendarACLRole> <CalendarACLScopeEntity> [sendnotifications <Boolean>] gam resources <ResourceEntity> create|add acls|calendaracls <CalendarACLRole> <CalendarACLScopeEntity> [sendnotifications <Boolean>]
@@ -4334,7 +4334,7 @@ gam resources <ResourceEntity> show acls|calendaracls
[noselfowner] [noselfowner]
[formatjson] [formatjson]
gam resources <ResourceEntity> print acls|calendaracls [todrive <ToDriveAttribute>*] gam resources <ResourceEntity> print acls|calendaracls [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
# Schemas # Schemas
@@ -5496,7 +5496,7 @@ gam <UserTypeEntity> show calendaracls <UserCalendarEntity>
[noselfowner] [noselfowner]
[formatjson] [formatjson]
gam <UserTypeEntity> print calendaracls <UserCalendarEntity> [todrive <ToDriveAttribute>*] gam <UserTypeEntity> print calendaracls <UserCalendarEntity> [todrive <ToDriveAttribute>*]
[noselfowner] [noselfowner] (addcsvdata <FieldName> <String>)*
[formatjson [quotechar <Character>]] [formatjson [quotechar <Character>]]
Transfer ownership of a selection of users calendars to another user Transfer ownership of a selection of users calendars to another user

View File

@@ -4,6 +4,17 @@ Merged GAM-Team version
6.63.10 6.63.10
Added option `addcsvdata <FieldName> <String>` to these commands. This adds additional columns of data to the CSV file output
when the `csv` option is used. If a CSV file of calendar information is being used to specify the calenders, fields, e.g., summary
can be added to the ACL output file.
```
gam <UserTypeEntity> print calendaracls <UserCalendarEntity>
gam resource <ResourceID> print calendaracls
gam resources <ResourceEntity> print calendaracls
gam calendar <CalendarEntity> printacl
gam calendars <CalendarEntity> print acls
```
Added commands to show the number of CrOS devices or Users in an entity. Added commands to show the number of CrOS devices or Users in an entity.
``` ```
gam <CrOSTypeEntity> show count gam <CrOSTypeEntity> show count

View File

@@ -34834,7 +34834,7 @@ def doCalendarsInfoACLs(calIds):
FJQC = _getCalendarInfoACLOptions() FJQC = _getCalendarInfoACLOptions()
_doInfoCalendarACLs(None, None, None, calIds, len(calIds), ACLScopeEntity, FJQC) _doInfoCalendarACLs(None, None, None, calIds, len(calIds), ACLScopeEntity, FJQC)
def _printShowCalendarACLs(cal, user, entityType, calId, i, count, csvPF, FJQC, noSelfOwner): def _printShowCalendarACLs(cal, user, entityType, calId, i, count, csvPF, FJQC, noSelfOwner, addCSVData):
if csvPF: if csvPF:
printGettingEntityItemForWhom(Ent.CALENDAR_ACL, calId, i, count) printGettingEntityItemForWhom(Ent.CALENDAR_ACL, calId, i, count)
try: try:
@@ -34873,6 +34873,8 @@ def _printShowCalendarACLs(cal, user, entityType, calId, i, count, csvPF, FJQC,
row = {'calendarId': calId} row = {'calendarId': calId}
if user: if user:
row['primaryEmail'] = user row['primaryEmail'] = user
if addCSVData:
row.update(addCSVData)
flattenJSON(rule, flattened=row) flattenJSON(rule, flattened=row)
if not FJQC.formatJSON: if not FJQC.formatJSON:
csvPF.WriteRowTitles(row) csvPF.WriteRowTitles(row)
@@ -34881,6 +34883,8 @@ def _printShowCalendarACLs(cal, user, entityType, calId, i, count, csvPF, FJQC,
ensure_ascii=False, sort_keys=False)} ensure_ascii=False, sort_keys=False)}
if user: if user:
row['primaryEmail'] = user row['primaryEmail'] = user
if addCSVData:
row.update(addCSVData)
csvPF.WriteRowNoFilter(row) csvPF.WriteRowNoFilter(row)
elif GC.Values[GC.CSV_OUTPUT_USERS_AUDIT] and user: elif GC.Values[GC.CSV_OUTPUT_USERS_AUDIT] and user:
csvPF.WriteRowNoFilter({'calendarId': calId, 'primaryEmail': user}) csvPF.WriteRowNoFilter({'calendarId': calId, 'primaryEmail': user})
@@ -34888,41 +34892,58 @@ def _printShowCalendarACLs(cal, user, entityType, calId, i, count, csvPF, FJQC,
for rule in acls: for rule in acls:
if noSelfOwner and rule['role'] == 'owner' and rule['scope']['value'] == calId: if noSelfOwner and rule['role'] == 'owner' and rule['scope']['value'] == calId:
continue continue
row = flattenJSON(rule, flattened={'resourceId': user, 'resourceEmail': calId}) row = {'resourceId': user, 'resourceEmail': calId}
if addCSVData:
row.update(addCSVData)
flattenJSON(rule, flattened=row)
if not FJQC.formatJSON: if not FJQC.formatJSON:
csvPF.WriteRowTitles(row) csvPF.WriteRowTitles(row)
elif csvPF.CheckRowTitles(row): elif csvPF.CheckRowTitles(row):
csvPF.WriteRowNoFilter({'resourceId': user, 'resourceEmail': calId, row = {'resourceId': user, 'resourceEmail': calId, 'JSON': json.dumps(cleanJSON(rule),
'JSON': json.dumps(cleanJSON(rule), ensure_ascii=False, sort_keys=False)}) ensure_ascii=False, sort_keys=False)}
if addCSVData:
row.update(addCSVData)
csvPF.WriteRowNoFilter(row)
def _getCalendarPrintShowACLOptions(titles): def _getCalendarPrintShowACLOptions(titles):
csvPF = CSVPrintFile(titles, 'sortall') if Act.csvFormat() else None csvPF = CSVPrintFile(titles, 'sortall') if Act.csvFormat() else None
FJQC = FormatJSONQuoteChar(csvPF) FJQC = FormatJSONQuoteChar(csvPF)
noSelfOwner = False noSelfOwner = False
addCSVData = {}
while Cmd.ArgumentsRemaining(): while Cmd.ArgumentsRemaining():
myarg = getArgument() myarg = getArgument()
if csvPF and myarg == 'todrive': if csvPF and myarg == 'todrive':
csvPF.GetTodriveParameters() csvPF.GetTodriveParameters()
elif myarg == 'noselfowner': elif myarg == 'noselfowner':
noSelfOwner = True noSelfOwner = True
elif csvPF and myarg == 'addcsvdata':
k = getString(Cmd.OB_STRING)
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
else: else:
FJQC.GetFormatJSONQuoteChar(myarg, True) FJQC.GetFormatJSONQuoteChar(myarg, True)
return (csvPF, FJQC, noSelfOwner) if csvPF:
if addCSVData:
csvPF.AddTitles(sorted(addCSVData.keys()))
if FJQC.formatJSON:
csvPF.AddJSONTitles(sorted(addCSVData.keys()))
csvPF.MoveJSONTitlesToEnd(['JSON'])
csvPF.SetSortAllTitles()
return (csvPF, FJQC, noSelfOwner, addCSVData)
# gam calendars <CalendarEntity> print acls [todrive <ToDriveAttribute>*] # gam calendars <CalendarEntity> print acls [todrive <ToDriveAttribute>*]
# [noselfowner] # [noselfowner] (addcsvdata <FieldName> <String>)*
# [formatjson [quotechar <Character>]] # [formatjson [quotechar <Character>]]
# gam calendars <CalendarEntity> show acls # gam calendars <CalendarEntity> show acls
# [noselfowner] # [noselfowner]
# [formatjson] # [formatjson]
# gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*] # gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
# [noselfowner] # [noselfowner] (addcsvdata <FieldName> <String>)*
# [formatjson] # [formatjson]
# gam calendar <CalendarEntity> showacl # gam calendar <CalendarEntity> showacl
# [noselfowner] # [noselfowner]
# [formatjson] # [formatjson]
def doCalendarsPrintShowACLs(calIds): def doCalendarsPrintShowACLs(calIds):
csvPF, FJQC, noSelfOwner = _getCalendarPrintShowACLOptions(['calendarId']) csvPF, FJQC, noSelfOwner, addCSVData = _getCalendarPrintShowACLOptions(['calendarId'])
count = len(calIds) count = len(calIds)
i = 0 i = 0
for calId in calIds: for calId in calIds:
@@ -34930,7 +34951,7 @@ def doCalendarsPrintShowACLs(calIds):
calId, cal = validateCalendar(calId, i, count) calId, cal = validateCalendar(calId, i, count)
if not cal: if not cal:
continue continue
_printShowCalendarACLs(cal, None, Ent.CALENDAR, calId, i, count, csvPF, FJQC, noSelfOwner) _printShowCalendarACLs(cal, None, Ent.CALENDAR, calId, i, count, csvPF, FJQC, noSelfOwner, addCSVData)
if csvPF: if csvPF:
csvPF.writeCSVfile('Calendar ACLs') csvPF.writeCSVfile('Calendar ACLs')
@@ -36490,10 +36511,10 @@ def doResourceInfoCalendarACLs(entityList):
_infoCalendarACLs(cal, resourceId, Ent.RESOURCE_CALENDAR, calId, i, count, ruleIds, jcount, FJQC) _infoCalendarACLs(cal, resourceId, Ent.RESOURCE_CALENDAR, calId, i, count, ruleIds, jcount, FJQC)
# gam resource <ResourceID> print calendaracls [todrive <ToDriveAttribute>*] # gam resource <ResourceID> print calendaracls [todrive <ToDriveAttribute>*]
# [noselfowner] # [noselfowner] (addcsvdata <FieldName> <String>)*
# [formatjson [quotechar <Character>]] # [formatjson [quotechar <Character>]]
# gam resources <ResourceEntity> print calendaracls [todrive <ToDriveAttribute>*] # gam resources <ResourceEntity> print calendaracls [todrive <ToDriveAttribute>*]
# [noselfowner] # [noselfowner] (addcsvdata <FieldName> <String>)*
# [formatjson [quotechar <Character>]] # [formatjson [quotechar <Character>]]
# gam resource <ResourceID> show calendaracls # gam resource <ResourceID> show calendaracls
# [noselfowner] # [noselfowner]
@@ -36503,7 +36524,7 @@ def doResourceInfoCalendarACLs(entityList):
# [formatjson] # [formatjson]
def doResourcePrintShowCalendarACLs(entityList): def doResourcePrintShowCalendarACLs(entityList):
cal = buildGAPIObject(API.CALENDAR) cal = buildGAPIObject(API.CALENDAR)
csvPF, FJQC, noSelfOwner = _getCalendarPrintShowACLOptions(['resourceId', 'resourceEmail']) csvPF, FJQC, noSelfOwner, addCSVData = _getCalendarPrintShowACLOptions(['resourceId', 'resourceEmail'])
i = 0 i = 0
count = len(entityList) count = len(entityList)
for resourceId in entityList: for resourceId in entityList:
@@ -36511,7 +36532,7 @@ def doResourcePrintShowCalendarACLs(entityList):
calId = _validateResourceId(resourceId, i, count) calId = _validateResourceId(resourceId, i, count)
if not calId: if not calId:
continue continue
_printShowCalendarACLs(cal, resourceId, Ent.RESOURCE_CALENDAR, calId, i, count, csvPF, FJQC, noSelfOwner) _printShowCalendarACLs(cal, resourceId, Ent.RESOURCE_CALENDAR, calId, i, count, csvPF, FJQC, noSelfOwner, addCSVData)
if csvPF: if csvPF:
csvPF.writeCSVfile('Resource Calendar ACLs') csvPF.writeCSVfile('Resource Calendar ACLs')
@@ -47358,14 +47379,14 @@ def infoCalendarACLs(users):
Ind.Decrement() Ind.Decrement()
# gam <UserTypeEntity> print calendaracls <UserCalendarEntity> [todrive <ToDriveAttribute>*] # gam <UserTypeEntity> print calendaracls <UserCalendarEntity> [todrive <ToDriveAttribute>*]
# [noselfowner] # [noselfowner] (addcsvdata <FieldName> <String>)*
# [formatjson [quotechar <Character>]] # [formatjson [quotechar <Character>]]
# gam <UserTypeEntity> show calendaracls <UserCalendarEntity> # gam <UserTypeEntity> show calendaracls <UserCalendarEntity>
# [noselfowner] # [noselfowner]
# [formatjson] # [formatjson]
def printShowCalendarACLs(users): def printShowCalendarACLs(users):
calendarEntity = getUserCalendarEntity(default='all') calendarEntity = getUserCalendarEntity(default='all')
csvPF, FJQC, noSelfOwner = _getCalendarPrintShowACLOptions(['primaryEmail', 'calendarId']) csvPF, FJQC, noSelfOwner, addCSVData = _getCalendarPrintShowACLOptions(['primaryEmail', 'calendarId'])
i, count, users = getEntityArgument(users) i, count, users = getEntityArgument(users)
for user in users: for user in users:
i += 1 i += 1
@@ -47377,7 +47398,7 @@ def printShowCalendarACLs(users):
for calId in calIds: for calId in calIds:
j += 1 j += 1
calId = convertUIDtoEmailAddress(calId) calId = convertUIDtoEmailAddress(calId)
_printShowCalendarACLs(cal, user, Ent.CALENDAR, calId, j, jcount, csvPF, FJQC, noSelfOwner) _printShowCalendarACLs(cal, user, Ent.CALENDAR, calId, j, jcount, csvPF, FJQC, noSelfOwner, addCSVData)
Ind.Decrement() Ind.Decrement()
if csvPF: if csvPF:
csvPF.writeCSVfile('Calendar ACLs') csvPF.writeCSVfile('Calendar ACLs')