Currently, there is only a single permission for using autocomplete on all searches. This can lead to security concerns, as autocomplete paths (delivering the autocomplete suggestions as JSON) are not secured by any other means. If suggestions for some searches can contain sensitive information, all users with search autocomplete permission could theoretically see these.
The attached patch (in comment 1) introduces finer-grained permissions, with one for each search for which autocomplete settings exist (i.e., which were previously enabled). This should catch most of the cases.
A note in the admin UI and an update function are also included.
Comments
Comment #1
drunken monkeyComment #2
mh86 commentedTested the patch: update function and access callback work well, and from a security point of view, the addition of separate permissions is absolutely necessary.
One small note, looks like this function is missing documentation ;-) Everything else is RTBC, in my opinion.
Comment #3
drunken monkeyYes, I already spotted that but found it unnecessary to submit a new patch, just planned to fix it before committing.
Thanks for testing!
Added documentation and committed.