Katello/katello — pull request #1215 by bbuckingham (2012-12-06 23:53:07+00:00)
Title: 880710 - api - updates to use org id or label when retrieving org

In a previous commit, there was a change to ensure
that org labels and names are 'unique'. In other words,
an org cannot be created where either it's label or name
matches the label or name of another organization.

With that, a change was also made to ensure that when we
queried for organization, we attempt to first retrieve it
using name and then label (if not found using name). The
issue was that the change was made in the specific api controller
(e.g. organizations_controller); however, the find_organization
was being invoked on the api_controller which had not been updated.

This commit simply updates the find_organization in the api_controller
to support the before mentioned algorithm. It also attempts to remove
or change some of the find_organization calls that are currently
in the lower level controllers (e.g. if they aren't doing anything other
than what's already provided by api_controller).