See #2345601-3: Block caching causes unexpected redirects when submitting empty search form: we currently display search blocks to all users, regardless of whether they have access to the underlying search page. I don't really think that's on purpose, and I doubt there is much use for that. I think most people will probably be confused by this, or some maybe don't even realize it.
However, the workaround of just setting the block visibility is pretty easy and will be readily apparent for almost all users. Furthermore, some sites might actually want to display the block even to users who can't access the search, to then display a "Please log in/register" or "Please give us money for that" message/page, and if we "fix" the current behavior we would make that much harder.
So, I think I'd like to have feedback on this issue before committing anything.

Comments

drunken monkey’s picture

Status: Active » Needs review
StatusFileSize
new985 bytes

Here is the (almost trivial) patch.

drunken monkey’s picture

Status: Needs review » Fixed

Committed.

  • drunken monkey committed 60d60c5 on
    Issue #2358735 by drunken monkey: Added access check when viewing the...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.