mirror of https://github.com/MISP/MISP
fix: Don't require users to accept the terms and conditions if they are not set, fixes #1381
parent
42584de8c2
commit
4c186337e4
|
@ -278,7 +278,7 @@ class AppController extends Controller {
|
|||
}
|
||||
|
||||
if ($this->Session->check(AuthComponent::$sessionKey)) {
|
||||
if (!$this->Auth->user('termsaccepted') && (!in_array($this->request->here, array($base_dir.'/users/terms', $base_dir.'/users/logout', $base_dir.'/users/login')))) {
|
||||
if (!empty(Configure::read('MISP.terms_file')) && !$this->Auth->user('termsaccepted') && (!in_array($this->request->here, array($base_dir.'/users/terms', $base_dir.'/users/logout', $base_dir.'/users/login')))) {
|
||||
if ($this->_isRest()) throw new MethodNotAllowedException('You have not accepted the terms of use yet, please log in via the web interface and accept them.');
|
||||
$this->redirect(array('controller' => 'users', 'action' => 'terms', 'admin' => false));
|
||||
} else if ($this->Auth->user('change_pw') && (!in_array($this->request->here, array($base_dir.'/users/terms', $base_dir.'/users/change_pw', $base_dir.'/users/logout', $base_dir.'/users/login')))) {
|
||||
|
|
Loading…
Reference in New Issue