mirror of https://github.com/MISP/MISP
Fixed a bug that allowed read-only users to create an event
parent
09f2e5a0bc
commit
e07cb6e5e2
|
@ -474,6 +474,9 @@ class EventsController extends AppController {
|
|||
* @return void
|
||||
*/
|
||||
public function add() {
|
||||
if (!$this->role['perm_add']) {
|
||||
throw new MethodNotAllowedException('You don\'t have permissions to create events');
|
||||
}
|
||||
if ($this->request->is('post')) {
|
||||
if ($this->_isRest()) {
|
||||
// Distribution, reporter for the events pushed will be the owner of the authentication key
|
||||
|
|
Loading…
Reference in New Issue