FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 289e7f31 authored by Dr Rich Wareham's avatar Dr Rich Wareham
Browse files

Merge branch 'issue-12-limit-group-description-length' into 'master'

Limit group descriptions to 300 characters.

Closes #12

See merge request !8
parents 4917ca18 9e49e4b2
No related branches found
No related tags found
1 merge request!8Limit group descriptions to 300 characters.
Pipeline #38159 passed
......@@ -378,13 +378,16 @@ def sync(configuration, *, read_only=True):
google_group_updates = {}
google_group_creations = {}
for groupID, managed_group_entry in managed_group_entries_by_groupID.items():
# Form expected group resource fields. Group names and descriptions can have a maximum of
# 73 and 4096 characters respectively in Google.
# Form expected group resource fields. The 2 Google APIs we use here to update groups in
# Google each have different maximum lengths for group names and descriptions, and
# empirically the APIs don't function properly if either limit is exceeded, so we use the
# minimum of the 2 documented maximum field lengths (73 characters for names and 300
# characters for descriptions).
expected_google_group = {
'name': _trim_text(
managed_group_entry.groupName, maxlen=73, suffix=sync_config.group_name_suffix
),
'description': _trim_text(managed_group_entry.description, maxlen=4096)
'description': _trim_text(managed_group_entry.description, maxlen=300)
}
# Find existing Google group (if any).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment