Merge branch 'main' of https://github.com/jay0lee/GAM into main

This commit is contained in:
Jay Lee
2021-09-27 08:21:54 -04:00
7 changed files with 45 additions and 15 deletions

View File

@@ -720,6 +720,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
(customfootertext <String>)|
(customreplyto <EmailAddress>)|
(defaultmessagedenynotificationtext <String>)|
(defaultsender default_self|group)|
(description <String>)|
(enablecollaborativeinbox|collaborative <Boolean>)|
(includeinglobaladdresslist|gal <Boolean>)|

View File

@@ -86,6 +86,7 @@ def printshow_policies():
for namespace in namespaces:
spacing = ' '
body['policySchemaFilter'] = f'{namespace}.*'
body['pageToken'] = None
try:
policies = gapi.get_all_pages(svc.customers().policies(), 'resolve',
items='resolvedPolicies',

View File

@@ -266,6 +266,8 @@ GROUP_ATTRIBUTES_ARGUMENT_TO_PROPERTY_MAP = {
'customReplyTo',
'defaultmessagedenynotificationtext':
'defaultMessageDenyNotificationText',
'defaultsender':
'defaultSender',
'enablecollaborativeinbox':
'enableCollaborativeInbox',
'favoriterepliesontop':
@@ -979,6 +981,9 @@ def update():
sys.stderr.write(
f'Group: {group}, Will add {len(to_add)} and remove {len(to_remove)} {role}s.\n'
)
for user in to_remove:
items.append(
['gam', 'update', 'group', group, 'remove', user])
for user in to_add:
item = ['gam', 'update', 'group', group, 'add']
if role:
@@ -987,9 +992,6 @@ def update():
item.append(delivery)
item.append(user)
items.append(item)
for user in to_remove:
items.append(
['gam', 'update', 'group', group, 'remove', user])
elif myarg in ['delete', 'remove']:
_, users_email, _ = _getRoleAndUsers()
if not exists(cd, group):
@@ -1219,7 +1221,7 @@ def getGroupAttrValue(myarg, value, gs_object, gs_body, function):
params) in list(gs_object['schemas']['Groups']['properties'].items()):
if attrib in ['kind', 'etag', 'email']:
continue
if myarg == attrib.lower():
if myarg == attrib.lower().replace('_', ''):
if params['type'] == 'integer':
try:
if value[-1:].upper() == 'M':

View File

@@ -8,7 +8,7 @@ import platform
import re
GAM_AUTHOR = 'Jay Lee <jay0lee@gmail.com>'
GAM_VERSION = '6.07'
GAM_VERSION = '6.08'
GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
GAM_URL = 'https://git.io/gam'
@@ -1110,7 +1110,8 @@ GROUP_SETTINGS_LIST_ATTRIBUTES = set([
'whoCanUnmarkFavoriteReplyOnAnyTopic',
'whoCanViewGroup',
'whoCanViewMembership',
# Miscellaneous hoices
# Miscellaneous choices
'default_sender',
'messageModerationLevel',
'replyTo',
'spamModerationLevel',

View File

@@ -8,7 +8,7 @@ url = https://github.com/jay0lee/GAM
author = Jay Lee
author_email = jay0lee@gmail.com
license = Apache
license_file = src/license.rtf
license_files = LICENSE
keywords = google, oauth2, gsuite, google-apps, google-admin-sdk, google-drive, google-cloud, google-calendar, gam, google-api, oauth2-client, google-workspace
classifiers =
Programming Language :: Python :: 3