]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Ignore a couple of internal groups
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Oct 2019 10:42:21 +0000 (10:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Oct 2019 10:42:21 +0000 (10:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/accounts.py

index 306b50a5f762727b843bb37ad21a3695be370ee4..52a5d9783ff14207514580fe5e85f6e275972e66 100644 (file)
@@ -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)