[WIP] Fixed wrong permission check in retrieveAutocompleteItemsAction in HelperController

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

TODO: add unit test for retrieveAutocompleteItemsAction.