FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

Synchronise Lookup institutions.

Merged Dean Rasheed requested to merge issue-7-synchronise-lookup-insts into master
All threads resolved!
3 files
+ 109
111
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
2
@@ -130,7 +130,9 @@ class Configuration(ConfigurationDataclassMixin):
Note that we return GroupEntry instances here since Lookup institutions become groups in
Google, and this simplifies the sync code by allowing us to handle institutions in the same
way as groups. The GroupEntry's groupID and groupName fields will be the institution's
instID and ou (name) respectively. The description field will not be set.
instID and ou (name) respectively. Since Lookup institutions don't have descriptions, we
set the description field to the institution's name as well (in Google, the description
allows longer strings, and so will not truncate the name).
"""
# This requires 2 LDAP queries. First find the managed institutions.
@@ -142,7 +144,7 @@ class Configuration(ConfigurationDataclassMixin):
managed_insts = [
GroupEntry(
groupID=_extract(e, 'instID'), groupName=_extract(e, 'ou'),
description=None, uids=set(),
description=_extract(e, 'ou'), uids=set(),
)
for e in self._search(
search_base=self.inst_search_base, search_filter=search_filter,
Loading