Index: openacs-4/packages/notifications/tcl/notifications-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notifications-security-procs.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/notifications/tcl/notifications-security-procs.tcl 17 Aug 2018 13:02:43 -0000 1.9 +++ openacs-4/packages/notifications/tcl/notifications-security-procs.tcl 11 Jul 2022 12:56:05 -0000 1.9.2.1 @@ -78,11 +78,11 @@ if {[acs_user::site_wide_admin_p -user_id $user_id]} { set allowed 1 } else { - set sql "select user_id from notification_requests where object_id = :request_id" - set owner_id [db_string get_user_id $sql -default ""] - if {$owner_id eq $user_id} { - set allowed 1 - } + set allowed [db_0or1row check_owner { + select 1 from notification_requests + where request_id = :request_id + and user_id = :user_id + }] } return $allowed }