server/querier.py
changeset 8867 6ad000b91347
parent 8748 f5027f8d2478
parent 8863 98c107bd6cd0
child 9167 c05652b108ce
equal deleted inserted replaced
8852:59a29405688c 8867:6ad000b91347
    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     """