survsimp_survey_admin_check db user_id survey_idWhat it does:
Returns 1 if user is allowed to administer a survey or is a site administrator, 0 otherwise.Defined in: /web/philip/tcl/survey-simple-defs.tcl
Source code:
if { ![ad_administrator_p $db $user_id] && [database_to_tcl_string $db " select creation_user from survsimp_surveys where survey_id = $survey_id"] != $user_id } { ad_return_error "Permission Denied" "You do not have permission to administer this survey." ad_script_abort }