mirror of https://github.com/MISP/MISP
fix: Removed redirect to the news page if no user is logged on
parent
d02adf2085
commit
eb788366c9
|
@ -282,7 +282,7 @@ class AppController extends Controller {
|
|||
$newsread = $this->User->field('newsread', array('User.id' => $this->Auth->user('id')));
|
||||
$this->loadModel('News');
|
||||
$latest_news = $this->News->field('date_created', array(), 'date_created DESC');
|
||||
if (!$this->_isRest() && ($this->params['controller'] != 'news' || $this->params['action'] != 'index') && $latest_news && $newsread < $latest_news) $this->redirect(array('controller' => 'news', 'action' => 'index', 'admin' => false));
|
||||
if ($this->Session->check(AuthComponent::$sessionKey) && !$this->_isRest() && ($this->params['controller'] != 'news' || $this->params['action'] != 'index') && $latest_news && $newsread < $latest_news) $this->redirect(array('controller' => 'news', 'action' => 'index', 'admin' => false));
|
||||
unset($base_dir);
|
||||
|
||||
// We don't want to run these role checks before the user is logged in, but we want them available for every view once the user is logged on
|
||||
|
|
Loading…
Reference in New Issue