Bug 1392513

Summary: Non-admin users can't edit their own profiles
Product: Red Hat Satellite Reporter: Josh Foots <jfoots>
Component: Users & RolesAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.2CC: bbuckingham, bkearney, cmarinea, dhlavacd, jcallaha, kdixon, mhulan, oshtaier, tbrisker, xdmoon
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: foreman-1.11.0.62-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1405498 (view as bug list) Environment:
Last Closed: 2017-01-26 10:44:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1405498    
Attachments:
Description Flags
verification screenshot none

Description Josh Foots 2016-11-07 16:12:16 UTC
Description of problem:

In Satellite 6.2.2 non-admin users can't edit their own profiles.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

 Oops, we're sorry but something went wrong PG::Error: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list LINE 1: ...ocation')) ORDER BY filters.role_id, filters.id, "roles"."n... ^ : SELECT DISTINCT "filters".* FROM "filters" INNER JOIN "filterings" ON "filterings"."filter_id" = "filters"."id" INNER JOIN "permissions" ON "permissions"."id" = "filterings"."permission_id" INNER JOIN "roles" ON "filters"."role_id" = "roles"."id" INNER JOIN "cached_user_roles" ON "roles"."id" = "cached_user_roles"."role_id" LEFT JOIN taxable_taxonomies ON (filters.id = taxable_taxonomies.taxable_id AND taxable_type = 'Filter') LEFT JOIN taxonomies ON (taxonomies.id = taxable_taxonomies.taxonomy_id) WHERE "roles"."builtin" = 0 AND "roles"."id" IN (14, 13, 15, 12, 11, 6, 4, 3, 17, 16, 8, 1, 2, 7, 5) AND "cached_user_roles"."user_id" = $1 AND (permissions.resource_type = 'Role') AND (permissions.name = 'view_roles') AND (taxable_taxonomies.id IS NULL OR (taxonomies.type = 'Organization') OR (taxonomies.type = 'Location')) ORDER BY filters.role_id, filters.id, "roles"."name" ASC

Expected results:

For non-admin users to edit their own profiles.

Additional info:

Comment 1 Marek Hulan 2016-11-07 17:07:29 UTC
This only happens if the user has more than 5 roles. Fix sent in upstream, waiting for review.

Comment 2 Bryan Kearney 2016-11-07 19:10:34 UTC
Upstream bug assigned to mhulan

Comment 3 Bryan Kearney 2016-11-07 19:10:37 UTC
Upstream bug assigned to mhulan

Comment 4 Bryan Kearney 2016-11-08 13:10:21 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17256 has been resolved.

Comment 6 Tomer Brisker 2016-12-05 15:09:07 UTC
*** Bug 1399840 has been marked as a duplicate of this bug. ***

Comment 8 Bryan Kearney 2016-12-05 16:11:33 UTC
Aligned to 6.2.6.

Comment 9 jcallaha 2017-01-09 21:03:06 UTC
Verified in Satellite 6.2.7 Snap 1

Attached is a screenshot of a non-administrative account 'testuser' that is editing their own profile. Changing fields worked as expected.

Comment 10 jcallaha 2017-01-09 21:04:00 UTC
Created attachment 1238895 [details]
verification screenshot

Comment 12 errata-xmlrpc 2017-01-26 10:44:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0197