Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
803604bc
Commit
803604bc
authored
May 10, 2017
by
Administrator
Browse files
Handle username-case in LdapManager
parent
181b0362
Changes
1
Hide whitespace changes
Inline
Side-by-side
auth.py
View file @
803604bc
...
...
@@ -87,6 +87,7 @@ class LdapManager:
connection
=
ldap3
.
Connection
(
self
.
server
)
obj_def
=
ldap3
.
ObjectDef
(
"posixgroup"
,
connection
)
group_reader
=
ldap3
.
Reader
(
connection
,
obj_def
,
self
.
group_dn
)
username
=
username
.
lower
()
for
group
in
group_reader
.
search
():
members
=
group
.
memberUid
.
value
if
members
is
not
None
and
username
in
members
:
...
...
Write
Preview
Supports
Markdown
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