Katello/katello — pull request #116 by parthaa (2012-05-14 23:47:13+00:00)
Title: 797412 - Fixed environment search call in the cli

Cli uses environment names as input params instead of id, so calls from the
cli need access for information on environments based of
name of the environment or other search clauses,
This commit adds a "search" route to the environments controllers
that first finds the environment that matches the search clauses
and then checks to see if for each environment if
the user can do at least one of
read_contents, read_systems, register_systems, update_systems,
delete_systems, read_changesets, manage_changesets, promote_changesets
with respect to that environment.
The cli calls were changed to follow the new route
api/organization/<:org_id>/environments/search

This commit also contains minor changes to the tasks_controller and
useful unit tests.