equal
deleted
inserted
replaced
497 # needed to remove rql expr granting update perm to the user |
497 # needed to remove rql expr granting update perm to the user |
498 self.schema['Affaire'].set_rqlexprs('update', ()) |
498 self.schema['Affaire'].set_rqlexprs('update', ()) |
499 self.assertRaises(Unauthorized, |
499 self.assertRaises(Unauthorized, |
500 self.schema['Affaire'].check_perm, session, 'update', eid) |
500 self.schema['Affaire'].check_perm, session, 'update', eid) |
501 cu = cnx.cursor() |
501 cu = cnx.cursor() |
502 cu.execute('SET X in_state S WHERE X ref "ARCT01", S name "abort"') |
502 cu.execute('SET X in_state S WHERE X ref "ARCT01", S name "ben non"') |
503 cnx.commit() |
503 cnx.commit() |
504 # though changing a user state (even logged user) is reserved to managers |
504 # though changing a user state (even logged user) is reserved to managers |
505 rql = u"SET X in_state S WHERE X eid %(x)s, S name 'deactivated'" |
505 rql = u"SET X in_state S WHERE X eid %(x)s, S name 'deactivated'" |
506 # XXX wether it should raise Unauthorized or ValidationError is not clear |
506 # XXX wether it should raise Unauthorized or ValidationError is not clear |
507 # the best would probably ValidationError if the transition doesn't exist |
507 # the best would probably ValidationError if the transition doesn't exist |