mirror of https://github.com/MISP/MISP
Merge branch 'hotfix-2.2.6'
commit
3b5595ff88
|
@ -96,6 +96,9 @@ class AttributesController extends AppController {
|
|||
* @throws NotFoundException // TODO Exception
|
||||
*/
|
||||
public function add($eventId = null) {
|
||||
if (!$this->userRole['perm_add']) {
|
||||
throw new MethodNotAllowedException('You don\'t have permissions to create attributes');
|
||||
}
|
||||
if ($this->request->is('post')) {
|
||||
$this->loadModel('Event');
|
||||
$date = new DateTime();
|
||||
|
|
|
@ -474,7 +474,7 @@ class EventsController extends AppController {
|
|||
* @return void
|
||||
*/
|
||||
public function add() {
|
||||
if (!$this->role['perm_add']) {
|
||||
if (!$this->userRole['perm_add']) {
|
||||
throw new MethodNotAllowedException('You don\'t have permissions to create events');
|
||||
}
|
||||
if ($this->request->is('post')) {
|
||||
|
|
Loading…
Reference in New Issue