Commit 93c878ba authored by jlaval's avatar jlaval

unauthentified fsearch

parent fc472be9
...@@ -65,7 +65,7 @@ class fsearch extends stdcontents ...@@ -65,7 +65,7 @@ class fsearch extends stdcontents
return $res; return $res;
} }
function fsearch ( $site, $exhaustive=true ) function fsearch ( $site, $exhaustive=true, $unauthentified=false )
{ {
global $wwwtopdir, $topdir; global $wwwtopdir, $topdir;
...@@ -89,7 +89,7 @@ class fsearch extends stdcontents ...@@ -89,7 +89,7 @@ class fsearch extends stdcontents
$pattern = '/'.$pattern.'/i'; $pattern = '/'.$pattern.'/i';
// Utilisateurs // Utilisateurs
if ( $site->user->is_valid() && ($site->user->cotisant || $site->user->utbm)) { if ( $unauthentified || ($site->user->is_valid() && ($site->user->cotisant || $site->user->utbm))) {
if ( !$site->user->is_in_group("gestion_ae") && !$site->user->is_asso_role ( 27, 1 ) && !$site->user->is_in_group("visu_cotisants") ) { if ( !$site->user->is_in_group("gestion_ae") && !$site->user->is_asso_role ( 27, 1 ) && !$site->user->is_in_group("visu_cotisants") ) {
if ($site->user->cotisant) if ($site->user->cotisant)
......
...@@ -48,7 +48,7 @@ function compute_pattern_with_size ($size) ...@@ -48,7 +48,7 @@ function compute_pattern_with_size ($size)
$_REQUEST['pattern'] = $str; $_REQUEST['pattern'] = $str;
$fsearch = new fsearch ($site, false); $fsearch = new fsearch ($site, false, true);
if (!empty ($fsearch->buffer)) if (!empty ($fsearch->buffer))
$redis->set($str, addslashes($fsearch->buffer)); $redis->set($str, addslashes($fsearch->buffer));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment