Index: openacs-4/packages/forums/www/admin/subscribe-others-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/subscribe-others-2.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/forums/www/admin/subscribe-others-2.tcl 29 Mar 2018 08:11:24 -0000 1.10 +++ openacs-4/packages/forums/www/admin/subscribe-others-2.tcl 7 Jun 2018 17:09:17 -0000 1.11 @@ -1,5 +1,5 @@ ad_page_contract { - + Subscribe a list of email addresses to a forum (process form) @author Jade Rubick (jade@rubick.com) @@ -32,7 +32,7 @@ set pretty_name $forum(name) # Check that the object can be subscribed to -notification::security::require_notify_object -object_id $forum_id +permission::require_permission -object_id $forum_id -privilege "read" ns_write "Subscribing users" @@ -58,17 +58,17 @@ } foreach line $lines { - + set rows [split $line ","] set length [llength $rows] - + set email [lindex $rows 0] if {$length > 1} { set fname [lindex $rows 1] } else { set fname "(no first name)" } - + if {$length > 2} { set lname [lindex $rows 2] } else { @@ -83,7 +83,7 @@ } else { if {[db_0or1row get_party_id { - select party_id, first_names as fname, last_name as lname + select party_id, first_names as fname, last_name as lname from cc_users where lower(email) = lower(:email) limit 1 @@ -97,8 +97,8 @@ } ns_write "
Name:$fname $lname" - + # user_id is blank if the account doesn't exist or if the # email account looks invalid. @@ -115,9 +115,9 @@ if {[string is false $user_exists_p]} { set password [ad_generate_random_string] - + array set auth_status_array [auth::create_user -email $email -first_names $fname -last_name $lname -password $password] - + set user_id $auth_status_array(user_id) } } else { @@ -126,14 +126,14 @@ } else { ns_write "
skipping user (not creating): $fname $lname ($email)" } - + } - + if {$user_id ne ""} { # Check if subscribed set request_id [notification::request::get_request_id -type_id $type_id -object_id $forum_id -user_id $user_id] - + if {$request_id ne ""} { ns_write "
already subscribed ($fname $lname ($email)
" } else { @@ -146,7 +146,7 @@ -delivery_method_id $delivery_method } } - + } } Index: openacs-4/packages/notifications/www/request-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-delete.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/notifications/www/request-delete.tcl 7 Aug 2017 23:48:13 -0000 1.5 +++ openacs-4/packages/notifications/www/request-delete.tcl 7 Jun 2018 17:09:17 -0000 1.6 @@ -12,7 +12,7 @@ } # Security Check -notification::security::require_admin_request -request_id $request_id +permission::require_permission -object_id $request_id -privilege "admin" # Actually Delete notification::request::delete -request_id $request_id Index: openacs-4/packages/notifications/www/request-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-new-2.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/notifications/www/request-new-2.tcl 28 Mar 2018 20:26:52 -0000 1.6 +++ openacs-4/packages/notifications/www/request-new-2.tcl 7 Jun 2018 17:09:17 -0000 1.7 @@ -15,7 +15,7 @@ set user_id [ad_conn user_id] # Check that the object can be subscribed to -notification::security::require_notify_object -object_id $object_id +permission::require_permission -party_id $user_id -object_id $object_id -privilege "read" # Add the request notification::request::new \ Index: openacs-4/packages/notifications/www/request-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-new.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/notifications/www/request-new.tcl 28 Mar 2018 20:26:52 -0000 1.14 +++ openacs-4/packages/notifications/www/request-new.tcl 7 Jun 2018 17:09:17 -0000 1.15 @@ -15,25 +15,25 @@ set user_id [auth::require_login] # Check that the object can be subscribed to -notification::security::require_notify_object -object_id $object_id +permission::require_permission -object_id $object_id -privilege "read" set doc(title) [_ notifications.Request_Notification] set context [list $doc(title)] -if {$pretty_name eq ""} { +if {$pretty_name eq ""} { set page_title [_ notifications.Request_Notification] -} else { +} else { set page_title [_ notifications.lt_Request_Notification_] } set intervals_pretty [notification::get_intervals -localized -type_id $type_id] set delivery_methods [notification::get_delivery_methods -type_id $type_id] ad_form -name subscribe -export {type_id object_id return_url} -form { - {interval_id:integer(select) + {interval_id:integer(select) {label "[_ notifications.lt_Notification_Interval]"} {options $intervals_pretty}} - {delivery_method_id:integer(select) + {delivery_method_id:integer(select) {label "[_ notifications.Delivery_Method]"} {options $delivery_methods} {value {[lindex $delivery_methods 0 1]}}