Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7025 - replace default_environment in sys #4561

Merged
merged 1 commit into from
Aug 11, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/controllers/katello/api/v2/systems_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def find_only_environment
# the single env of the org or throw an error if more than one.
#
if @organization.kt_environments.size > 1
if current_user.default_environment && current_user.default_environment.organization == @organization
@environment = current_user.default_environment
if current_user.default_organization && current_user.default_organization == @organization
@environment = current_user.library
else
fail HttpErrors::BadRequest, _("Organization %s has more than one environment. Please specify target environment for content host registration.") % @organization.name
end
Expand Down