server/test/unittest_security.py
changeset 9984 793377697c81
parent 9782 95e8fa2c8da8
parent 9981 7099bbd685aa
child 9990 c84ad981fc4a
child 10114 6f4b4567b77d
--- a/server/test/unittest_security.py	Fri Sep 12 09:49:01 2014 +0200
+++ b/server/test/unittest_security.py	Wed Sep 24 18:04:30 2014 +0200
@@ -408,6 +408,21 @@
             self.assertRaises(Unauthorized, cnx.commit)
             cnx.execute('SET X web "http://www.logilab.org" WHERE X eid %(x)s', {'x': eid})
             cnx.commit()
+        with self.new_access('iaminusersgrouponly').repo_cnx() as cnx:
+            cnx.execute('INSERT Frozable F: F name "Foo"')
+            cnx.commit()
+            cnx.execute('SET F name "Bar" WHERE F is Frozable')
+            cnx.commit()
+            cnx.execute('SET F name "BaBar" WHERE F is Frozable')
+            cnx.execute('SET F frozen True WHERE F is Frozable')
+            with self.assertRaises(Unauthorized):
+                cnx.commit()
+            cnx.rollback()
+            cnx.execute('SET F frozen True WHERE F is Frozable')
+            cnx.commit()
+            cnx.execute('SET F name "Bar" WHERE F is Frozable')
+            with self.assertRaises(Unauthorized):
+                cnx.commit()
 
     def test_attribute_security_rqlexpr(self):
         with self.admin_access.repo_cnx() as cnx: