diff --git a/dicos/91_ninegate.xml b/dicos/91_ninegate.xml
index e13c01f2..60cf2056 100644
--- a/dicos/91_ninegate.xml
+++ b/dicos/91_ninegate.xml
@@ -88,6 +88,7 @@
user_groups
non
+ client
non
scribe
@@ -463,7 +464,8 @@
ninegate_ssoreqgroup
ninegate_ssosynchroitem
ninegate_ssoreqitem
-
+ ninegate_typesso
+
ninegate_syncldap
ninegate_ldaptemplate
ninegate_scribegroup
@@ -562,7 +564,15 @@
ninegate_ssosynchrogroup
ninegate_ssoreqgroup
ninegate_ssosynchroitem
- ninegate_ssoreqitem
+ ninegate_ssoreqitem
+
+
+
+ SQL
+ LDAP
+ SAML
+
+ ninegate_typesso
@@ -1636,6 +1646,10 @@
['CAS', 'SAML', 'SQL', 'LDAP']
+
+ ['client', 'proxy']
+
+
['none', 'byuser', 'byadmin']
diff --git a/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php b/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php
index aa2aa621..e3c0412c 100644
--- a/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php
+++ b/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php
@@ -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
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php
index efe78e63..5139f18f 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php
@@ -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);
}
diff --git a/tmpl/ninegate-template.yml b/tmpl/ninegate-template.yml
index b9f7fc9d..0a2a656e 100644
--- a/tmpl/ninegate-template.yml
+++ b/tmpl/ninegate-template.yml
@@ -540,6 +540,8 @@ parameters:
cas_host: %%eolesso_adresse
cas_path: %%getVar("eolesso_cas_folder", '')
cas_port: %%eolesso_port
+ cas_type: %%getVar("ninegate_typesso", 'client')
+
# Si mode_aut = SAML
saml_entityid: 'http://dev.nuonet.cadoles'