def _verify_query_segregation(query, auth_project=None):
 auth_project = (auth_project or rbac.get_limited_to_project(pecan.request.headers))
 if (not auth_project):
  return
 for q in query:
  if ((q.field in ('project', 'project_id')) and (auth_project != q.value)):
   raise base.ProjectNotAuthorized(q.value)

def _verify_query_segregation ( query , auth_project = None ) : auth_project = ( auth_project or rbac . get_limited_to_project ( pecan . request . headers ) ) if ( not auth_project ) : return for q in query : if ( ( q . field in ( 'project' , 'project_id' ) ) and ( auth_project != q . value ) ) : raise base . ProjectNotAuthorized ( q . value )
ensure non-admin queries are not constrained to another project .