# HG changeset patch # User Sylvain Thénault # Date 1448285857 -3600 # Node ID 5d7f17054ae68317717bd5a2a33b98a55dafac0e # Parent addc7ba36f69c6124ece2a47a6deb4a433505591 [ldapfeed] use source's extid2eid, the repo's one will be deprecated in a near future. diff -r addc7ba36f69 -r 5d7f17054ae6 server/sources/ldapfeed.py --- a/server/sources/ldapfeed.py Tue Nov 24 14:36:41 2015 +0100 +++ b/server/sources/ldapfeed.py Mon Nov 23 14:37:37 2015 +0100 @@ -1,4 +1,4 @@ -# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2015 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -262,9 +262,9 @@ except Exception: self.error('while trying to authenticate %s', user, exc_info=True) raise AuthenticationError() - eid = self.repo.extid2eid(self, user['dn'].encode('ascii'), 'CWUser', cnx, insert=False) - if eid < 0: - # user has been moved away from this source + eid = self.repo.system_source.extid2eid(cnx, user['dn'].encode('ascii')) + if eid is None or eid < 0: + # user is not known or has been moved away from this source raise AuthenticationError() return eid