sources/ldap: only warn about missing groups when source is configured to sync groups
closes #4392 Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
a42f2f7217
commit
9445354b31
|
@ -77,6 +77,7 @@ class MembershipLDAPSynchronizer(BaseLDAPSynchronizer):
|
||||||
if group_uniq not in self.group_cache:
|
if group_uniq not in self.group_cache:
|
||||||
groups = Group.objects.filter(**{f"attributes__{LDAP_UNIQUENESS}": group_uniq})
|
groups = Group.objects.filter(**{f"attributes__{LDAP_UNIQUENESS}": group_uniq})
|
||||||
if not groups.exists():
|
if not groups.exists():
|
||||||
|
if self._source.sync_groups:
|
||||||
self.message(
|
self.message(
|
||||||
f"Group does not exist in our DB yet, run sync_groups first: '{group_dn}'",
|
f"Group does not exist in our DB yet, run sync_groups first: '{group_dn}'",
|
||||||
group=group_dn,
|
group=group_dn,
|
||||||
|
|
Reference in New Issue