`find_default_organization_and_or_environment` does exactly what it says! it gets the current user's default organization or default environment and sets them to variables for the upcoming action.

from `app/controllers/katello/api/v2/api_controller.rb`:
```ruby
def find_default_organization_and_or_environment
  # This has to grab the first default org associated with this user AND
  # the environment that goes with him.
  return if params.key?(:organization_id) || params.key?(:owner) || params.key (:environment_id)

  #At this point we know that they didn't supply an org or environment, so we can look up the default
  @environment = current_user.default_environment
  if @environment
    @organization = @environment.organization
  else
    fail HttpErrors::NotFound, _("You have not set a default organization and environment on the user %s.") % current_user.login
  end
end
```

the `systems#index` action requires an organization or environment to scope the list of systems. `find_default_organization_and_or_environment` looks to see if the user has a default org of default env set if they do not specify an org id or env id in the HTTP params, failing if either of those defaults are set. this method was previously called `verify_presence_of_organization_or_environment`. i felt that `find_default_organization_and_or_environment` was more descriptive, but maybe not :wink: .

`#find_optional_organization` is also called in this case to account for the possibility of the user having a default org, **and** specifying an org id via HTTP params as well. `@organization` would first be set to `default_org_1_for_user` by the `find_default_organization_and_or_environment` method because it checks for defaults first. then `@organization` would be set to `non_default_org_number_2` because the user specified that in his/her HTTP params. having both of those ensures that we look for a default first, then a specified if it was specified.