Hello,

I am using the module for its ability to limit which content types are returned in a site search, and I noticed a strange behavior for anonymous users on the search results form. On this site, I have disallowed the Advanced search form by un-checking "use advanced search" in the "search module" section of the Permissions admin page.

After installing, enabling, and configuring the module, I get the content types that I want in the search results, but anonymous users see the content types checkboxes and the categories selector list. Users with the proper permissions see the collapsed Advanced search fieldset, as they should.

I tracked this down to the hook_form_alter function in the search_config.module file. It appears that line 43 should check for the "use advanced search" permission before any of the Advanced search fields are displayed:

  if ($form_id == 'search_form') {

I believe this should be:

  if ($form_id == 'search_form' && user_access('use advanced search')) {

Best regards,
Alan

Comments

Alan D.’s picture

Status: Active » Fixed

Thanks, pushed into dev

Status: Fixed » Closed (fixed)

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

dafeder’s picture

Version: 6.x-1.6 » 7.x-1.x-dev
Status: Closed (fixed) » Active

I am seeing this problem in 7.x dev.

dafeder’s picture

Version: 7.x-1.x-dev » 6.x-1.6
Status: Active » Closed (fixed)

Sorry! Nevermind, was logged in with wrong permissions.