Fixes #4853: Prevents 500 error loading subscription details from API.
Previous changes to ensure the use of Foreman's authentication and authorization call resulted in the subscriptions details breaking. The find_subscriptions method makes a call out to Candlepin which requires a current user. Thus, the authorize method was moved higher in the filter stack and the entities required to do authorization such as the provider, and organization were placed prior to the authorization check.
Related issues
Bug #4853: Subscriptions show page produces 500 error
Fixes #4853: Prevents 500 error loading subscription details from API.
Previous changes to ensure the use of Foreman's authentication and authorization
call resulted in the subscriptions details breaking. The find_subscriptions
method makes a call out to Candlepin which requires a current user. Thus,
the authorize method was moved higher in the filter stack and the entities
required to do authorization such as the provider, and organization were
placed prior to the authorization check.