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