mirror of https://github.com/MISP/MISP
Merge branch '2.4' of github.com:MISP/MISP into 2.4
commit
6a60438229
|
@ -2855,11 +2855,14 @@ class AttributesController extends AppController
|
|||
throw new NotFoundException(__('Invalid attribute'));
|
||||
}
|
||||
$this->Attribute->read();
|
||||
if (!$this->_isSiteAdmin() && $this->Attribute->data['Event']['orgc_id'] !== $this->Auth->user('org_id')) {
|
||||
$fails++;
|
||||
continue;
|
||||
}
|
||||
if ($this->Attribute->data['Attribute']['deleted']) {
|
||||
throw new NotFoundException(__('Invalid attribute'));
|
||||
}
|
||||
$eventId = $this->Attribute->data['Attribute']['event_id'];
|
||||
|
||||
$this->Attribute->Event->recursive = -1;
|
||||
$event = $this->Attribute->Event->read(array(), $eventId);
|
||||
if (!$this->_isSiteAdmin() && !$this->userRole['perm_sync']) {
|
||||
|
|
|
@ -25,7 +25,7 @@ class ObjectTemplatesController extends AppController
|
|||
'conditions' => array('ObjectTemplate.active' => 1),
|
||||
'fields' => array('id', 'meta-category', 'name', 'description', 'org_id'),
|
||||
'contain' => array('Organisation.name'),
|
||||
'sort' => array('ObjectTemplate.name asc')
|
||||
'order' => array('ObjectTemplate.name asc')
|
||||
));
|
||||
$templates = array('all' => array());
|
||||
foreach ($templates_raw as $k => $template) {
|
||||
|
@ -47,19 +47,20 @@ class ObjectTemplatesController extends AppController
|
|||
|
||||
public function view($id)
|
||||
{
|
||||
if (Validation::uuid($id)) {
|
||||
$temp = $this->ObjectTemplate->find('first', array(
|
||||
'recursive' => -1,
|
||||
'conditions' => array('ObjectTemplate.uuid' => $id),
|
||||
'fields' => array('ObjectTemplate.id', 'ObjectTemplate.uuid')
|
||||
));
|
||||
if (empty($temp)) {
|
||||
throw new NotFoundException(__('Invalid object template'));
|
||||
}
|
||||
$id = $temp['ObjectTemplate']['id'];
|
||||
} elseif (!is_numeric($id)) {
|
||||
throw new NotFoundException(__('Invalid object template id.'));
|
||||
}
|
||||
if (Validation::uuid($id)) {
|
||||
$temp = $this->ObjectTemplate->find('first', array(
|
||||
'recursive' => -1,
|
||||
'conditions' => array('ObjectTemplate.uuid' => $id),
|
||||
'fields' => array('ObjectTemplate.id', 'ObjectTemplate.uuid'),
|
||||
'order' => array('ObjectTemplate.version desc')
|
||||
));
|
||||
if (empty($temp)) {
|
||||
throw new NotFoundException(__('Invalid object template'));
|
||||
}
|
||||
$id = $temp['ObjectTemplate']['id'];
|
||||
} elseif (!is_numeric($id)) {
|
||||
throw new NotFoundException(__('Invalid object template id.'));
|
||||
}
|
||||
$params = array(
|
||||
'recursive' => -1,
|
||||
'contain' => array(
|
||||
|
|
|
@ -100,6 +100,7 @@ sudo a2dismod status
|
|||
sudo a2enmod ssl rewrite
|
||||
sudo a2dissite 000-default
|
||||
sudo a2ensite default-ssl
|
||||
sudo a2enmod headers
|
||||
|
||||
# Switch to python3 by default (optional)
|
||||
|
||||
|
|
Loading…
Reference in New Issue