mirror of https://github.com/MISP/MISP
chg: [internal] Remove unused methods
parent
6e2c15ff60
commit
eb658877cb
|
@ -111,13 +111,6 @@ class SharingGroup extends AppModel
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchAllAuthorisedForServer($server)
|
|
||||||
{
|
|
||||||
$sgs = $this->SharingGroupOrg->fetchAllAuthorised($server['RemoteOrg']['id']);
|
|
||||||
$sgs = array_merge($sgs, $this->SharingGroupServer->fetchAllSGsForServer($server['Server']['id']));
|
|
||||||
return $sgs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all sharing groups that the user is allowed to see.
|
* Returns a list of all sharing groups that the user is allowed to see.
|
||||||
* Scope can be:
|
* Scope can be:
|
||||||
|
|
|
@ -107,20 +107,4 @@ class SharingGroupServer extends AppModel
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchAllSGsForServer($server_id)
|
|
||||||
{
|
|
||||||
$sgs = $this->find('all', array(
|
|
||||||
'recursive' => -1,
|
|
||||||
'conditions' => array('server_id' => $server_id)
|
|
||||||
));
|
|
||||||
if (empty($sgs)) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
$sgids = array();
|
|
||||||
foreach ($sgs as $temp) {
|
|
||||||
$sgids[] = $temp[$this->alias]['id'];
|
|
||||||
}
|
|
||||||
return $sgids;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue