Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
27a0c21c
Commit
27a0c21c
authored
8 years ago
by
Christoph Witzany
Browse files
Options
Downloads
Patches
Plain Diff
make tests for ldap more specific to not be fooled by Mocks
parent
3555a659
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/auth.py
+3
-3
3 additions, 3 deletions
synapse/handlers/auth.py
with
3 additions
and
3 deletions
synapse/handlers/auth.py
+
3
−
3
View file @
27a0c21c
...
@@ -58,7 +58,7 @@ class AuthHandler(BaseHandler):
...
@@ -58,7 +58,7 @@ class AuthHandler(BaseHandler):
self
.
ldap_email_property
=
hs
.
config
.
ldap_email_property
self
.
ldap_email_property
=
hs
.
config
.
ldap_email_property
self
.
ldap_full_name_property
=
hs
.
config
.
ldap_full_name_property
self
.
ldap_full_name_property
=
hs
.
config
.
ldap_full_name_property
if
self
.
ldap_enabled
:
if
self
.
ldap_enabled
is
True
:
import
ldap
import
ldap
logger
.
info
(
"
Import ldap version: %s
"
,
ldap
.
__version__
)
logger
.
info
(
"
Import ldap version: %s
"
,
ldap
.
__version__
)
...
@@ -444,8 +444,8 @@ class AuthHandler(BaseHandler):
...
@@ -444,8 +444,8 @@ class AuthHandler(BaseHandler):
@defer.inlineCallbacks
@defer.inlineCallbacks
def
_check_ldap_password
(
self
,
user_id
,
password
):
def
_check_ldap_password
(
self
,
user_id
,
password
):
if
not
self
.
ldap_enabled
:
if
self
.
ldap_enabled
is
not
True
:
logger
.
info
(
"
LDAP not configured
"
)
logger
.
debug
(
"
LDAP not configured
"
)
defer
.
returnValue
(
False
)
defer
.
returnValue
(
False
)
import
ldap
import
ldap
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment