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.27.2.2 -r1.27.2.3 --- openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 21 May 2004 23:13:13 -0000 1.27.2.2 +++ openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 2 Aug 2004 04:31:37 -0000 1.27.2.3 @@ -19,7 +19,16 @@ 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 {