Bug #7042
closedexposing DB tables when listing roles via API
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1102732
Description of problem:
API for listing roles fails with information about the failed database SELECT
Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140523.0-Satellite-x86_64
How reproducible:
always
Steps to Reproduce:
$ curl -s -H \"Content-Type:application/json\" -H \"Accept:application/json,version=2\" -k -u admin:changeme http://localhost/katello/api/roles?per_page=10
Actual results: {"displayMessage":"PGError: ERROR: column katello_roles.per_page does not exist\nLINE 1: ...ECT \"katello_roles\".* FROM \"katello_roles\" WHERE \"katello_r...\n ^\n: SELECT \"katello_roles\".* FROM \"katello_roles\" WHERE \"katello_roles\".\"per_page\" = '10' AND (type <> 'Katello::UserOwnRole' or type is NULL) ORDER BY katello_roles.name","errors":["PGError: ERROR: column katello_roles.per_page does not exist\nLINE 1: ...ECT \"katello_roles\".* FROM \"katello_roles\" WHERE \"katello_r...\n ^\n: SELECT \"katello_roles\".* FROM \"katello_roles\" WHERE \"katello_roles\".\"per_page\" = '10' AND (type <> 'Katello::UserOwnRole' or type is NULL) ORDER BY katello_roles.name"]}
Expected results:- not exposing DB table names like 'katello_roles'
- return list of roles