theforeman/foreman — pull request #401 by eLobato (2013-02-05 14:33:27+00:00)
Title: Fix for auto_complete_search (broken since RC5 for non-admin users)

This PR makes auto complete search accessible to non-admin users. Otherwise, the action 'auto_complete_search' will get in the users model 'allowed_to?' method, and this method will never be able to find a role that allows an user to do the action 'auto_complete_search' unless this user is an admin.
The way to fix this as it has been done previously on the users_controller is to change the action to 'index', which is an action that an user role might have on its list of allowed actions.