Bug 1335850

Summary: ISE while accessing Content -> Red Hat Repositories in Any Context
Product: Red Hat Satellite Reporter: Ashish Humbe <ahumbe>
Component: WebUIAssignee: satellite6-bugs <satellite6-bugs>
WebUI sub component: Katello QA Contact: Katello QA List <katello-qa-list>
Status: CLOSED DUPLICATE Docs Contact:
Severity: high    
Priority: high CC: bbuckingham, cwelton, xdmoon
Version: 6.2.0Keywords: Regression, Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-24 19:42:23 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: 1115190    

Description Ashish Humbe 2016-05-13 11:48:56 UTC
Description of problem:

Below error message is seen while accessing Content ->  Red Hat Repositories in "Any Context" in webui: 

=================
We're sorry, but something went wrong.

If you are the application owner check the logs for more information.
=================

Error message in production.log: 


2016-05-13 17:10:48 [app] [E] User does not belong to an organization. (Katello::Errors::SecurityViolation)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.24/app/controllers/katello/application_controller.rb:254:in `require_org'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
.
.
.

 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2016-05-13 17:10:48 [app] [I] Completed 500 Internal Server Error in 26ms
2016-05-13 17:10:48 [app] [F] 
 | ActionView::MissingTemplate (Missing template katello/common/403 with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :rabl]}. Searched in:
 |   * "/usr/share/foreman/app/views"
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.4/app/views"


Version-Release number of selected component (if applicable):
Satellite v 6.2 public Beta

How reproducible:
Always 

Steps to Reproduce:
1. Switch to Any Context 
2. Navigate to Content -> Red Hat Repositories


Actual results:
ISE 

Expected results:
It should redirect to a page to select Organization: 

https://satellite.example.com/select_organization?toState=%2Fsubscriptions

Additional info:

Comment 1 Ashish Humbe 2016-05-13 11:59:33 UTC
Small correction:


Expected results:
It should redirect to a page to select Organization: 

https://satellite.example.com/select_organization?toState=%2FXXXXXX

Example: When we access Content -> Red Hat Subscriptions  page in Any Context it is redirected to the select organization page.

Comment 5 Brad Buckingham 2016-05-24 19:42:23 UTC

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