From: Paul Wise Date: Mon, 13 Jun 2016 00:26:19 +0000 (+0800) Subject: Fix is_guest_account for the usergroups transition X-Git-Tag: userdir-ldap-0.3.88~10 X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=b22af6dffb85542441935a2c117105b38f0b53b5;hp=ff541ab5bf7a4bd359d8b3f2cf41b9b9f4c5fd59;p=mirror%2Fuserdir-ldap.git Fix is_guest_account for the usergroups transition Prevents guest accounts from using debian-private and debian.net --- diff --git a/UDLdap.py b/UDLdap.py index f19703f..e917542 100644 --- a/UDLdap.py +++ b/UDLdap.py @@ -88,7 +88,7 @@ class Account: return self['accountStatus'] == 'active' and self.numkeys() != 0 def is_guest_account(self): - return self['gidNumber'] == 60000 + return 'guest' in self['supplementaryGid'] def latitude_dec(self, anonymized=False): return userdir_ldap.DecDegree(self['latitude'], anonymized)