equal
deleted
inserted
replaced
61 # permission utilities ######################################################## |
61 # permission utilities ######################################################## |
62 |
62 |
63 def check_no_password_selected(rqlst): |
63 def check_no_password_selected(rqlst): |
64 """check that Password entities are not selected""" |
64 """check that Password entities are not selected""" |
65 for solution in rqlst.solutions: |
65 for solution in rqlst.solutions: |
66 if 'Password' in solution.itervalues(): |
66 for var, etype in solution.iteritems(): |
67 raise Unauthorized('Password selection is not allowed') |
67 if etype == 'Password': |
|
68 raise Unauthorized('Password selection is not allowed (%s)' % var) |
68 |
69 |
69 def term_etype(session, term, solution, args): |
70 def term_etype(session, term, solution, args): |
70 """return the entity type for the given term (a VariableRef or a Constant |
71 """return the entity type for the given term (a VariableRef or a Constant |
71 node) |
72 node) |
72 """ |
73 """ |