apply_filters( 'relevanssi_admin_search_capability', string $capability )

Filters the capability required to access Relevanssi admin search page.


(string) The capability level required to access the Relevanssi admin search page. Default edit_posts (ie. contributor level).

More information

By default, all users from the contributor role up are allowed access to the Relevanssi admin search. If you want to restrict that access to a higher level, you can adjust the minimum capability required:

add_filter( 'relevanssi_admin_search_capability', function ( $capability ) { return 'publish_posts'; } );

This would require publish_posts, which means author role.

For editor role, you can use edit_others_posts. For admin role, you can use manage_options and for super admins, you can use manage_network.

For more information on roles and capabilities, see Roles and Capabilities in the Codex.