X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=UDLdap.py;h=f19703fd94a14cecbd3191e9507c9050421583a7;hb=de6be72a0f8c50acaf83a9111f0bd3901e5eac1c;hp=3c0f0efe121591bd0d1470b952800fb1933694ae;hpb=a8cec059917fb8daada42441329cadf9a89e82be;p=mirror%2Fuserdir-ldap.git 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):