X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=UDLdap.py;h=f07ba361ac929821e82b4e7d947000178db05a23;hb=1fba345532896a49d61b365dbbe5fa52135f2ab3;hp=f19703fd94a14cecbd3191e9507c9050421583a7;hpb=5bef88f3d6253fc7109d753e9a48284fd420f504;p=mirror%2Fuserdir-ldap.git diff --git a/UDLdap.py b/UDLdap.py index f19703f..f07ba36 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 'supplementaryGid' in self and 'guest' in self['supplementaryGid'] def latitude_dec(self, anonymized=False): return userdir_ldap.DecDegree(self['latitude'], anonymized)