Stopped redirecting to /login if no valid session
This commit is contained in:
parent
de8edf982a
commit
7d1b112db9
|
@ -10,7 +10,14 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$this->_forward('index', 'showbuilder');
|
$CC_CONFIG = Config::getConfig();
|
||||||
|
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||||
|
$this->view->headLink()->appendStylesheet($baseUrl.'css/landing-page.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
$this->_helper->layout->setLayout('login');
|
||||||
|
|
||||||
|
$this->view->stationLogo = Application_Model_Preference::GetStationLogo();
|
||||||
|
$this->view->stationName = Application_Model_Preference::GetStationName();
|
||||||
|
$this->view->stationDescription = Application_Model_Preference::GetStationDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mainAction()
|
public function mainAction()
|
||||||
|
|
|
@ -139,12 +139,15 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
||||||
}
|
}
|
||||||
else //Non-REST, regular Airtime web app requests
|
else //Non-REST, regular Airtime web app requests
|
||||||
{
|
{
|
||||||
//Redirect you to the login screen since you have no session.
|
// Redirect user to the landing page if they are trying to
|
||||||
if ($controller !== 'login') {
|
// access a resource that requires a valid session.
|
||||||
|
// Skip the redirection if they are already on the landing page
|
||||||
|
// or the login page.
|
||||||
|
if ($controller !== 'index' && $controller !== 'login') {
|
||||||
|
|
||||||
if ($request->isXmlHttpRequest()) {
|
if ($request->isXmlHttpRequest()) {
|
||||||
|
|
||||||
$url = 'http://'.$request->getHttpHost().'/login';
|
$url = 'http://'.$request->getHttpHost().'/';
|
||||||
$json = Zend_Json::encode(array('auth' => false, 'url' => $url));
|
$json = Zend_Json::encode(array('auth' => false, 'url' => $url));
|
||||||
|
|
||||||
// Prepare response
|
// Prepare response
|
||||||
|
@ -157,7 +160,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
||||||
Zend_Controller_Action_HelperBroker::getStaticHelper('redirector')->redirectAndExit();
|
Zend_Controller_Action_HelperBroker::getStaticHelper('redirector')->redirectAndExit();
|
||||||
} else {
|
} else {
|
||||||
$r = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
|
$r = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
|
||||||
$r->gotoSimpleAndExit('index', 'login', $request->getModuleName());
|
$r->gotoSimpleAndExit('index', 'index', $request->getModuleName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
.landing-page-content {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
color: #fff;
|
||||||
|
padding-top: 60px;
|
||||||
|
/*position: relative;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.station-info {
|
||||||
|
/*position: absolute;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@media (min-width: 640px) {
|
||||||
|
.station-info {
|
||||||
|
float:left;
|
||||||
|
margin-right: 20px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.station-info {
|
||||||
|
float: none;
|
||||||
|
margin-right: 0px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
Loading…
Reference in New Issue