mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 11:55:04 -02:30
provide __init__ arg for LDAP group type
This commit is contained in:
@@ -299,7 +299,10 @@ class LDAPGroupTypeField(fields.ChoiceField):
|
|||||||
data = super(LDAPGroupTypeField, self).to_internal_value(data)
|
data = super(LDAPGroupTypeField, self).to_internal_value(data)
|
||||||
if not data:
|
if not data:
|
||||||
return None
|
return None
|
||||||
return getattr(django_auth_ldap.config, data)()
|
if data.endswith('MemberDNGroupType'):
|
||||||
|
return getattr(django_auth_ldap.config, data)(member_attr='member')
|
||||||
|
else:
|
||||||
|
return getattr(django_auth_ldap.config, data)()
|
||||||
|
|
||||||
|
|
||||||
class LDAPUserFlagsField(fields.DictField):
|
class LDAPUserFlagsField(fields.DictField):
|
||||||
|
|||||||
Reference in New Issue
Block a user