--- a/server/test/unittest_security.py Mon Apr 26 18:45:03 2010 +0200
+++ b/server/test/unittest_security.py Wed Apr 28 12:14:22 2010 +0200
@@ -1,5 +1,21 @@
+# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
+#
+# This file is part of CubicWeb.
+#
+# CubicWeb is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 2.1 of the License, or (at your option)
+# any later version.
+#
+# logilab-common is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License along
+# with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
"""functional tests for server'security
-:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""
import sys
@@ -32,12 +48,12 @@
self.schema['Personne'].set_action_permissions('read', ('users', 'managers'))
self.repo.vreg.solutions(self.session, rqlst, None)
solution = rqlst.solutions[0]
- check_read_access(self.schema, self.session.user, rqlst, solution)
+ check_read_access(self.session, rqlst, solution, {})
cnx = self.login('anon')
cu = cnx.cursor()
self.assertRaises(Unauthorized,
check_read_access,
- self.schema, cnx.user(self.session), rqlst, solution)
+ self.session, rqlst, solution, {})
self.assertRaises(Unauthorized, cu.execute, rql)
def test_upassword_not_selectable(self):