[Fusionforge-commits] r11694 - trunk/src/plugins/oslc/include/oslc-zend/application/controllers

Sabri LABBENE labbenes at libremir.placard.fr.eu.org
Fri Dec 3 14:33:49 CET 2010


Author: labbenes
Date: 2010-12-03 14:33:48 +0100 (Fri, 03 Dec 2010)
New Revision: 11694

Modified:
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php
Log:
Add authorizatiion for codendi GET requests

Modified: trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php	2010-12-03 11:58:57 UTC (rev 11693)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php	2010-12-03 13:33:48 UTC (rev 11694)
@@ -93,9 +93,13 @@
     public function getAction(){
         $params = $this->getRequest()->getParams();
 
-        // check authentication
-        if(!$this->retrieveAuthentication($login)){
+        // Check if Authorization header was set in the request.
+        $auth = $this->getRequest()->getHeader('Authorization');
+        if (strlen($auth) != 0) {
+            // check authentication
+            if(!$this->retrieveAuthentication($login)){
                 throw new Exception('Invalid authentication provided !');
+            }
         }
 
         // handle OSLC services catalog access (http://open-services.net/bin/view/Main/OslcServiceProviderCatalogV1)




More information about the Fusionforge-commits mailing list