server/sources/native.py
changeset 11177 8448a8c5cca4
parent 11118 0c645f09d96a
child 11224 a4fcee1e9789
--- a/server/sources/native.py	Tue Feb 16 18:17:35 2016 +0100
+++ b/server/sources/native.py	Mon Mar 07 17:53:20 2016 +0100
@@ -1486,7 +1486,12 @@
         if 'CWUser' in schema: # probably an empty schema if not true...
             # rql syntax trees used to authenticate users
             self._passwd_rqlst = self.source.compile_rql(self.passwd_rql, self._sols)
-            self._auth_rqlst = self.source.compile_rql(self.auth_rql, self._sols)
+            if 'CWSource' in schema:
+                self._auth_rqlst = self.source.compile_rql(self.auth_rql, self._sols)
+            else:
+                self._auth_rqlst = self.source.compile_rql(
+                        u'Any X WHERE X is CWUser, X login %(login)s, X upassword %(pwd)s',
+                        ({'X': 'CWUser', 'P': 'Password'},))
 
     def authenticate(self, cnx, login, password=None, **kwargs):
         """return CWUser eid for the given login/password if this account is