Bug 1399840 - Non Admin User with more than 5 roles error: Oops, we're sorry but something went wrong
Summary: Non Admin User with more than 5 roles error: Oops, we're sorry but something ...
Keywords:
Status: CLOSED DUPLICATE of bug 1392513
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.2.2
Hardware: Unspecified
OS: Unspecified
medium
low vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-29 21:23 UTC by Christian Marineau
Modified: 2020-02-14 18:13 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-05 15:09:07 UTC
Target Upstream Version:


Attachments (Terms of Use)
Error from WebUI (30.02 KB, image/png)
2016-11-29 21:23 UTC, Christian Marineau
no flags Details

Description Christian Marineau 2016-11-29 21:23:46 UTC
Created attachment 1226063 [details]
Error from WebUI

Description of problem:
When assigning 6 roles or more to a user who is not admin, it will throw an error when he logs on:
Oops, we're sorry but something went wrong 


Version-Release number of selected component (if applicable):
Satellite 6.2.X


Steps to Reproduce:
1. Create a user
2. Add 6 random roles, do not make him admin
3. Log on as the new user, an error will occur. 


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 (7, 6, 8, 18, 17, 2) 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:
No error when user log on


Additional info:
As a workaround, a specific role could be create to avoid adding so many roles.

Comment 2 Tomer Brisker 2016-12-05 15:09:07 UTC

*** This bug has been marked as a duplicate of bug 1392513 ***


Note You need to log in before you can comment on or make changes to this bug.