4teamwork/opengever.core — pull request #222 by lukasgraf (2014-03-18 08:24:35+00:00)
Title: ldap_util: Make check for user object classes case-insensitive.

In [`apply_schema_map()`](https://github.com/4teamwork/opengever.core/blob/master/opengever/ogds/base/ldap_util.py#L332), a check is being done if the object is in fact a user, and only user objects will have the schema map applied:

```python
# Check if entry is a user object - we only want to apply the
# LDAPUserFolder mapping to those
is_user = False
obj_classes = attrs['objectClass']
for obj_class in obj_classes:
if obj_class in self.context._user_objclasses:
is_user = True
```

This check is done by comparing its object classes to the `_user_objclasses` setting of the LDAPUserFolder. This check needs to be **case-insensitive**, otherwise we might fail to detect certain user objects as such, and not map their attributes, leading to the user id attribute not being found.