Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fountain
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
urz-django
fountain
Commits
abdf3988
Commit
abdf3988
authored
May 10, 2016
by
Daniel Klaffenbach
🐍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ldap: Add workaround for ldap3 issue #177
This fixes Python3 compatibility
parent
ab3e68fa
Pipeline
#2231
passed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fountain/ldap.py
fountain/ldap.py
+1
-1
No files found.
fountain/ldap.py
View file @
abdf3988
...
...
@@ -33,7 +33,7 @@ class Ldap(object):
def
get_attributes
(
self
,
username
):
conn
=
self
.
connection
model_attrs
=
{}
if
conn
.
search
(
self
.
LDAP_PARAMS
[
'base'
],
'(uid=%s)'
%
username
,
attributes
=
self
.
LDAP_SYNC_USER_ATTRIBUTES
.
keys
(
)):
if
conn
.
search
(
self
.
LDAP_PARAMS
[
'base'
],
'(uid=%s)'
%
username
,
attributes
=
tuple
(
self
.
LDAP_SYNC_USER_ATTRIBUTES
)):
for
attr
in
self
.
LDAP_SYNC_USER_ATTRIBUTES
:
if
attr
in
conn
.
response
[
0
][
'attributes'
]:
model_attrs
[
self
.
LDAP_SYNC_USER_ATTRIBUTES
[
attr
]]
=
conn
.
response
[
0
][
'attributes'
][
attr
][
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment