Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1427282

Summary: PG::Error: ERROR: missing FROM-clause entry for table "katello_environments" when viewing activation keys as a user with customized viewing permissions
Product: Red Hat Satellite Reporter: Rick Dixon <rdixon>
Component: Activation KeysAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: high Docs Contact: Sanket Jagtap <sjagtap>
Priority: medium    
Version: 6.2.7CC: andrew.schofield, bbuckingham, dhlavacd, jcallaha, mhulan, mmccune, oshtaier, sauchter, sjagtap, zhunting
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.0.0.138-1.el7sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1463813 (view as bug list) Environment:
Last Closed: 2017-08-10 17:02:29 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: 1316897    
Attachments:
Description Flags
perm none

Comment 2 Marek Hulan 2017-03-01 10:14:46 UTC
I was able to reproduce on 6.2.8, it's not related to authorization layer. The filters works fine with Katello::ActivationKey.authorized(:view_actiovation_keys). The problem appears when counts of found resources are calculated in generic api controller.

Comment 3 Marek Hulan 2017-03-01 10:17:56 UTC
Created redmine issue http://projects.theforeman.org/issues/18738 from this bug

Comment 4 Marek Hulan 2017-03-17 16:19:10 UTC
*** Bug 1433048 has been marked as a duplicate of this bug. ***

Comment 6 Satellite Program 2017-03-17 18:19:10 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18738 has been resolved.

Comment 7 Sanket Jagtap 2017-07-24 10:17:07 UTC
Build : Satellite 6.2.11 snap1


1.Created a role with Similar filter mentioned above
2.Created ak with three envs QA, Dev, Production
3.Created filter for view_activation_keys with filter as environment = QA or environment = Dev
Output: This displayed the ak's for QA and Dev Environment

There was no traceback

Comment 8 Sanket Jagtap 2017-07-24 10:17:52 UTC
Created attachment 1303549 [details]
perm

Permission with filter

Comment 10 errata-xmlrpc 2017-08-10 17:02:29 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:2466