[dev] [patch] goops guest access

Ben Chavet ben at chavet.net
Fri Apr 30 13:01:52 PDT 2004


$registry->allowGuests() doesn't exist anymore.  The attached patch fixes 
this call.

--Ben

Files Modified:
  goops/lib/base.php
-------------- next part --------------
Index: base.php
===================================================================
RCS file: /repository/goops/lib/base.php,v
retrieving revision 1.2
diff -u -r1.2 base.php
--- base.php	30 Apr 2004 15:46:17 -0000	1.2
+++ base.php	30 Apr 2004 20:00:02 -0000
@@ -19,8 +19,11 @@
 
 // Registry.
 $registry = &Registry::singleton();
-if (is_a($registry->pushApp('goops'), 'PEAR_Error')) {
-    Horde::fatal(PEAR::raiseError(_("goops is not correctly configured or there was an error loading configuration files.")), __FILE__, __LINE__, false);
+if (is_a(($pushed = $registry->pushApp('goops', !defined('AUTH_HANDLER'))), 'PEAR_Error')) {
+    if ($pushed->getCode() == 'permission_denied') {
+        Horde::authenticationFailureRedirect(); 
+    }
+    Horde::fatal($pushed, __FILE__, __LINE__, false);
 }
 
 $conf = &$GLOBALS['conf'];
@@ -31,12 +34,6 @@
 // Notification system.
 $notification = &Notification::singleton();
 $notification->attach('status');
-
-// Don't allow access unless there is a Horde login, or guests are
-// allowed.
-if (!(Auth::isAuthenticated() || $registry->allowGuests())) {
-    Horde::authenticationFailureRedirect();
-}
 
 // Find the base file path of Goops.
 @define('GOOPS_BASE', dirname(__FILE__) . '/..');


More information about the dev mailing list