From b63657213b78af1b3c5794158415ff97a7de45b3 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 29 Oct 2019 10:42:21 +0000 Subject: [PATCH] people: Ignore a couple of internal groups Signed-off-by: Michael Tremer --- src/backend/accounts.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/backend/accounts.py b/src/backend/accounts.py index 306b50a5..52a5d978 100644 --- a/src/backend/accounts.py +++ b/src/backend/accounts.py @@ -1069,6 +1069,11 @@ class StopForumSpam(Object): class Groups(Object): + hidden_groups = ( + "cn=LDAP Read Only,ou=Group,dc=ipfire,dc=org", + "cn=LDAP Read Write,ou=Group,dc=ipfire,dc=org", + ) + @property def search_base(self): return "ou=Group,%s" % self.backend.accounts.search_base @@ -1090,6 +1095,10 @@ class Groups(Object): groups = [] for dn, attrs in res: + # Skip any hidden groups + if dn in self.hidden_groups: + continue + g = Group(self.backend, dn, attrs) groups.append(g) -- 2.47.3