From: Michael Tremer Date: Tue, 29 Oct 2019 10:42:21 +0000 (+0000) Subject: people: Ignore a couple of internal groups X-Git-Url: http://git.ipfire.org/?p=ipfire.org.git;a=commitdiff_plain;h=b63657213b78af1b3c5794158415ff97a7de45b3 people: Ignore a couple of internal groups Signed-off-by: Michael Tremer --- 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)