mirror of https://github.com/MISP/MISP
fix: [internal] Do not throw warning when user don't have collections
parent
73a8a973c7
commit
67037f140d
|
@ -63,7 +63,7 @@ class TagCollection extends AppModel
|
|||
return true;
|
||||
}
|
||||
|
||||
public function fetchTagCollection($user, $params = array())
|
||||
public function fetchTagCollection(array $user, $params = array())
|
||||
{
|
||||
if (empty($user['Role']['perm_site_admin'])) {
|
||||
$params['conditions']['AND'][] = array(
|
||||
|
@ -104,8 +104,17 @@ class TagCollection extends AppModel
|
|||
return true;
|
||||
}
|
||||
|
||||
public function cullBlockedTags($user, $tagCollections)
|
||||
/**
|
||||
* @param array $user
|
||||
* @param array $tagCollections
|
||||
* @return array|
|
||||
*/
|
||||
public function cullBlockedTags(array $user, array $tagCollections)
|
||||
{
|
||||
if (empty($tagCollection)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$single = false;
|
||||
if (!isset($tagCollections[0])) {
|
||||
$tagCollections = array(0 => $tagCollections);
|
||||
|
|
Loading…
Reference in New Issue