diff options
-rw-r--r-- | keystone/identity/backends/ldap/core.py | 6 | ||||
-rw-r--r-- | tests/_ldap_livetest.py | 3 | ||||
-rw-r--r-- | tests/test_backend_ldap.py | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/keystone/identity/backends/ldap/core.py b/keystone/identity/backends/ldap/core.py index 3138720f..5d95d500 100644 --- a/keystone/identity/backends/ldap/core.py +++ b/keystone/identity/backends/ldap/core.py @@ -105,6 +105,12 @@ class Identity(identity.Driver): return None return _filter_user(user_ref) + def get_user_by_name(self, user_name): + user_ref = self.user.get_by_name(user_name) + if not user_ref: + return None + return _filter_user(user_ref) + def get_metadata(self, user_id, tenant_id): if not self.get_tenant(tenant_id): return None diff --git a/tests/_ldap_livetest.py b/tests/_ldap_livetest.py index 167e0e51..803d13e9 100644 --- a/tests/_ldap_livetest.py +++ b/tests/_ldap_livetest.py @@ -56,6 +56,3 @@ class LDAPIdentity(test.TestCase, test_backend.IdentityTests): def tearDown(self): test.TestCase.tearDown(self) - - def test_get_user_by_name(self): - raise nose.exc.SkipTest('not implemented in ldap yet') diff --git a/tests/test_backend_ldap.py b/tests/test_backend_ldap.py index b989bcef..5300be83 100644 --- a/tests/test_backend_ldap.py +++ b/tests/test_backend_ldap.py @@ -31,6 +31,3 @@ class LDAPIdentity(test.TestCase, test_backend.IdentityTests): def tearDown(self): test.TestCase.tearDown(self) - - def test_get_user_by_name(self): - raise nose.exc.SkipTest('not implemented in ldap yet') |