Index: openacs-4/www/site-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/site-master.adp,v diff -u -r1.3 -r1.4 --- openacs-4/www/site-master.adp 21 Sep 2003 19:21:17 -0000 1.3 +++ openacs-4/www/site-master.adp 23 Sep 2003 07:59:10 -0000 1.4 @@ -24,11 +24,11 @@ - - -
+ @system_name@ + Welcome, @user_name@ @@ -37,7 +37,7 @@ +   Admin Index: openacs-4/www/site-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/site-master.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/www/site-master.tcl 21 Sep 2003 19:21:17 -0000 1.5 +++ openacs-4/www/site-master.tcl 23 Sep 2003 07:59:10 -0000 1.6 @@ -36,23 +36,31 @@ set pvt_home_url [ad_pvt_home] set pvt_home_name [ad_pvt_home_name] set logout_url [ad_get_logout_url] -} else { - set login_url [ad_get_login_url -return] -} -# Site-wide admin link -set admin_url {} -if { [ad_conn user_id] != 0 } { - set sw_admin_p [acs_user::site_wide_admin_p] + # Site-wide admin link + set admin_url {} + + set sw_admin_p [acs_user::site_wide_admin_p -user_id [ad_conn untrusted_user_id]] + if { $sw_admin_p } { - set admin_url "/acs-admin/" - set devhome_url "/acs-admin/developer" - } elseif { [permission::permission_p -object_id [subsite::get_element -element object_id] -privilege admin] } { - set admin_url "[subsite::get_element -element url]admin/" + set admin_url "/acs-admin/" + set devhome_url "/acs-admin/developer" + } else { + set subsite_admin_p [permission::permission_p \ + -object_id [subsite::get_element -element object_id] \ + -privilege admin \ + -party_id [ad_conn untrusted_user_id]] + + if { $subsite_admin_p } { + set admin_url "[subsite::get_element -element url]admin/" + } } +} else { + set login_url [ad_get_login_url -return] } + # Context bar if { [template::util::is_nil no_context_p] } { if { ![template::util::is_nil context] } {