freebsd-ports/devel/py-Products.LDAPUserFolder/files/extra-patch-posixgroup
Ruslan Makhmatkhanov 92b3ef6f28 A LDAP-enabled Zope 2 user folder
WWW:	http://pypi.python.org/pypi/Products.LDAPUserFolder

Submitted by:   lstewart (via mail)
2012-05-20 09:38:49 +00:00

23 lines
1 KiB
Text

---
--- Adapted from: https://weblion.psu.edu/trac/weblion/wiki/LDAPWithPlone
---
--- ./Products/LDAPUserFolder/utils.py.orig 2012-05-17 14:02:47.611295104 +1000
+++ ./Products/LDAPUserFolder/utils.py 2012-05-17 14:07:46.758482401 +1000
@@ -48,6 +48,7 @@
, 'accessGroup' : 'member'
, 'group' : 'member'
, 'univentionGroup' : 'uniqueMember'
+ , 'posixgroup' : 'memberUid'
}
VALID_GROUP_ATTRIBUTES = Set(list(GROUP_MEMBER_MAP.values()) +
--- Products/LDAPUserFolder/LDAPUserFolder.py.orig 2012-05-17 14:04:48.056802645 +1000
+++ Products/LDAPUserFolder/LDAPUserFolder.py 2012-05-17 14:06:44.506625107 +1000
@@ -1229,6 +1229,7 @@
if dn != '*':
f_template = '(&(objectClass=%s)(%s=%s))'
group_filter = '(|'
+ dn = dn.replace('uid=', '').replace(',' + self.users_base, '')
for g_name, m_name in GROUP_MEMBER_MAP.items():
fltr = filter_format(f_template, (g_name, m_name, dn))