mirror of https://github.com/MISP/MISP
fix: [internal] better error messages for attaching a tag failing
parent
0f40cef0f1
commit
89a3d9b3fe
|
@ -955,10 +955,10 @@ class TagsController extends AppController
|
|||
}
|
||||
if (!$this->_isSiteAdmin()) {
|
||||
if (!in_array($existingTag['Tag']['org_id'], array(0, $this->Auth->user('org_id')))) {
|
||||
throw new MethodNotAllowedException('Invalid Tag.');
|
||||
throw new MethodNotAllowedException('Invalid Tag. This tag can only be set by a fixed organisation.');
|
||||
}
|
||||
if (!in_array($existingTag['Tag']['user_id'], array(0, $this->Auth->user('id')))) {
|
||||
throw new MethodNotAllowedException('Invalid Tag.');
|
||||
throw new MethodNotAllowedException('Invalid Tag. This tag can only be set by a fixed user.');
|
||||
}
|
||||
}
|
||||
$this->loadModel($objectType);
|
||||
|
|
Loading…
Reference in New Issue