X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=UDLdap.py;fp=UDLdap.py;h=f19703fd94a14cecbd3191e9507c9050421583a7;hp=3c0f0efe121591bd0d1470b952800fb1933694ae;hb=5bef88f3d6253fc7109d753e9a48284fd420f504;hpb=b73b4a9e229a805c32bf21e337e347666ec0b1a3 diff --git a/UDLdap.py b/UDLdap.py index 3c0f0ef..f19703f 100644 --- a/UDLdap.py +++ b/UDLdap.py @@ -87,6 +87,9 @@ class Account: def is_active_user(self): return self['accountStatus'] == 'active' and self.numkeys() != 0 + def is_guest_account(self): + return self['gidNumber'] == 60000 + def latitude_dec(self, anonymized=False): return userdir_ldap.DecDegree(self['latitude'], anonymized) def longitude_dec(self, anonymized=False):