Skip to content
Snippets Groups Projects
Commit 59682bf4 authored by Julian's avatar Julian
Browse files

Revert "fixed tests after they broke by a827f27b"

This reverts commit 4a705c11.
parent 416ef3df
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ from flask import current_app
from uffd import ldap
class User():
def __init__(self, uid=None, loginname='', displayname='', mail='', groups=None, dn=None, uuid=None): # pylint: disable=too-many-arguments
def __init__(self, uid=None, loginname='', displayname='', mail='', groups=None, dn=None, uuid=None):
self.uid = uid
self.loginname = loginname
self.displayname = displayname
......@@ -30,12 +30,7 @@ class User():
mail=ldapobject['mail'].value,
groups=ldap.get_ldap_array_attribute_safe(ldapobject, 'memberOf'),
dn=ldapobject.entry_dn,
# The LDAP mock does not generate UUIDs for newly created LDAP objects,
# so we use a dummy value if the attribute is missing (only for testing!)
uuid=ldapobject['entryUUID'].value \
if 'entryUUID' in ldapobject.entry_attributes_as_dict \
or not current_app.config.get('LDAP_SERVICE_MOCK', False) \
else '00000000-0000-0000-0000-000000000000'
uuid=ldapobject['entryUUID'].value
)
@classmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment