Index: openacs-4/packages/notifications/www/unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/unsubscribe.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/notifications/www/unsubscribe.tcl 29 Jun 2018 17:27:19 -0000 1.4 +++ openacs-4/packages/notifications/www/unsubscribe.tcl 19 Apr 2021 13:31:05 -0000 1.4.2.1 @@ -10,12 +10,16 @@ return_url:localurl } -set request_count [llength $request_id] -for { set i 0} { $i < $request_count } { incr i } { - db_transaction { - set r_id [lindex $request_id $i] - db_dml remove_notify {} - } +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege create + +set request_ids $request_id +foreach request_id $request_ids { + # Security Check + notification::security::require_admin_request -request_id $request_id + + # Actually Delete + notification::request::delete -request_id $request_id } ad_returnredirect $return_url