Adding missing permission check in search.php