Index: openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 29 Jun 2004 10:17:36 -0000 1.33 +++ openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 2 Aug 2004 04:25:07 -0000 1.34 @@ -19,8 +19,15 @@ ad_proc -public ds_permission_p {} { Do we have permission to view developer support stuff. } { - return [permission::permission_p -party_id [ds_ad_conn user_id] -object_id [ds_instance_id] -privilege "admin"] + set party_id [ds_ad_conn user_id] + if {$party_id == 0} { + # set up a fake id in order to make user_switching mode work with + # non logged users, if not it will enter into a infinite loop with + # ad_conn in any new unknown request (roc) + set party_id "-99" } + return [permission::permission_p -party_id $party_id -object_id [ds_instance_id] -privilege "admin"] +} ad_proc -public ds_require_permission { object_id