Another weird workaround for auth application.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Jul 2009 03:30:57 +0000 (21:30 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Jul 2009 03:31:00 +0000 (21:31 -0600)
Callback must not have checkperms set or else we run into issues with
looping of LoginTasks. For sanity, do the check inside the auth callback
itself.

imp/lib/api.php

index be91a97..c616dec 100644 (file)
@@ -150,7 +150,8 @@ $_services = array(
     ),
 
     'authAuthenticateCallback' => array(
-        'args' => array()
+        'args' => array(),
+        'checkperms' => false
     ),
 
     'authTransparent' => array(
@@ -705,8 +706,10 @@ function _imp_authTransparent()
  */
 function _imp_authAuthenticateCallback()
 {
-    require_once dirname(__FILE__) . '/base.php';
-    IMP_Auth::authenticateCallback();
+    if (Horde_Auth::getAuth()) {
+        require_once dirname(__FILE__) . '/base.php';
+        IMP_Auth::authenticateCallback();
+    }
 }
 
 /**