mirror of https://github.com/MISP/MISP
Fix to users with auth key access not being able to reset their authkey
parent
8c1d42d1c1
commit
7f6c8425ae
|
@ -407,7 +407,7 @@ class UsersController extends AppController {
|
|||
}
|
||||
$this->User->read();
|
||||
if ('me' == $id ) $id = $this->Auth->user('id');
|
||||
else if (!$this->_isSiteAdmin() && !($this->_isAdmin() && $this->Auth->user('org') == $this->User->data['User']['org'])) throw new MethodNotAllowedException();
|
||||
else if (!$this->_isSiteAdmin() && !($this->_isAdmin() && $this->Auth->user('org') == $this->User->data['User']['org']) && ($this->Auth->user('id') != $id)) throw new MethodNotAllowedException();
|
||||
$newkey = $this->User->generateAuthKey();
|
||||
$this->User->saveField('authkey', $newkey);
|
||||
$this->Session->setFlash(__('New authkey generated.', true));
|
||||
|
|
Loading…
Reference in New Issue