Want to prevent anonymous users from seeing certain content types on our site.

Is there a way once we restrict their access that we can then remove from the advanced search only leaving the ones they have access to?

Thank you!

Comments

jonathan_hunt’s picture

Status: Active » Needs review
StatusFileSize
new1.09 KB

I think the issue is that the .install file sets the module weight lower than node.module. When the search_restrict_form_alter() runs the node module has not yet attached the advanced form, so no search_restrict logic is applied. The attached patch installs this module with a higher weight so that it runs after node.module.

jonathan_hunt’s picture

StatusFileSize
new2.02 KB

I've included the refactoring from https://drupal.org/node/1340740 into a revised patch.

hyperglide’s picture

@jonathan_hunt Thank you -- had forgotten all about this post. Very glad to see your patches.

I am confused over the difference between them. I believe I wan the one in #2 as this includes some other patches from #1340740: _search_restrict_advanced_form() should use _search_restrict_excluded_content_types() function

Correct?