config typesso client ou proxy (fixes #32904)
This commit is contained in:
@ -30,7 +30,10 @@ class SecurityController extends Controller
|
||||
|
||||
// Init Client CAS
|
||||
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
if($this->getParameter("cas_type")=="client")
|
||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
else
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
|
||||
|
||||
@ -195,7 +198,10 @@ class SecurityController extends Controller
|
||||
public function logoutAction() {
|
||||
// Init Client CAS
|
||||
\phpCAS::setDebug(false);
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
||||
if($this->getParameter("cas_type")=="client")
|
||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
||||
else
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
|
||||
|
||||
@ -209,7 +215,10 @@ class SecurityController extends Controller
|
||||
|
||||
// Init Client CAS
|
||||
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
if($this->getParameter("cas_type")=="client")
|
||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
else
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
|
||||
|
||||
@ -297,7 +306,7 @@ class SecurityController extends Controller
|
||||
}
|
||||
|
||||
function imapunreadAction() {
|
||||
if($this->getParameter("active_imapunread")) {
|
||||
if($this->getParameter("active_imapunread")&&$this->getParameter("cas_type")=="proxy") {
|
||||
$ip=$this->getParameter("imapundread_ip");
|
||||
|
||||
// Init Client CAS
|
||||
|
@ -973,7 +973,12 @@ class InitDataCommand extends ContainerAwareCommand
|
||||
$entityItem->addGroup($groupall);
|
||||
}
|
||||
$entityItem->setUrl($widroundcube_url);
|
||||
$entityItem->setBadgeurl("/ninegate/cas/imapunread");
|
||||
|
||||
if($this->getContainer()->getParameter('cas_type')=="proxy")
|
||||
$entityItem->setBadgeurl("/ninegate/cas/imapunread");
|
||||
else
|
||||
$entityItem->setBadgeurl(null);
|
||||
|
||||
$em->persist($entityItem);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user