Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v diff -u -r1.12.2.4 -r1.12.2.5 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 2 Jul 2003 19:24:30 -0000 1.12.2.4 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 4 Jul 2003 13:51:45 -0000 1.12.2.5 @@ -429,6 +429,25 @@ db_dml user_update {} } +ad_proc -public acs_user::site_wide_admin_p { + {-user_id ""} +} { + Return 1 if the specified user (defaults to logged in user) + is site-wide administrator and 0 otherwise. + + @param user_id The id of the user to check for admin privilege. + + @author Peter Marklund +} { + if { [empty_string_p $user_id]} { + set user_id [ad_conn user_id] + } + + return [permission::permission_p -party_id $user_id \ + -object_id [acs_lookup_magic_object security_context_root] \ + -privilege "admin"] +} + ad_proc -public party::update { {-party_id:required} {-email:required} @@ -444,5 +463,3 @@ } { db_dml party_update {} } - -