press_admin_any_group_p db user_idWhat it does:
returns 1 if this user is a valid site-wide or group administrator for any group, 0 otherwiseDefined in: /web/philip/tcl/press-defs.tcl
Source code:
if {[ad_administrator_p $db $user_id]} { # this is a site-wide admin, return true always return 1 } elseif {$user_id != 0} { # we have an authenticated user, let's see if they have the # admin role in ANY group if {0 < [database_to_tcl_string $db " select count(*) from user_group_map where user_id = $user_id and lower(role) = 'administrator'"]} { return 1 } else { return 0 } } # not authorized via one of the preceding mechanisms return 0