diff --git a/module/search/control.php b/module/search/control.php
index 22e5935e0e..942094faa1 100644
--- a/module/search/control.php
+++ b/module/search/control.php
@@ -149,12 +149,12 @@ class search extends control
$query = $queryID ? $queryID : '';
$module = empty($module) ? $this->session->searchParams['module'] : $module;
$queries = $this->search->getQueryPairs($module);
-
$html = '';
foreach($queries as $queryID => $queryName)
{
if(empty($queryID)) continue;
- $html .= '
' . html::a("javascript:executeQuery({$queryID})", $queryName . (common::hasPriv('search', 'deleteQuery') ? '' : ''), '', "class='label user-query' data-query-id='$queryID'") . '';
+ $query = $this->search->getByID($queryID);
+ $html .= '' . html::a("javascript:executeQuery({$queryID})", $queryName . ((common::hasPriv('search', 'deleteQuery') and $this->app->user->account == $query->account) ? '' : ''), '', "class='label user-query' data-query-id='$queryID' title='{$queryName}'") . '';
}
echo $html;
}