Index: openacs-4/packages/news/tcl/test/news-db-test-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/test/news-db-test-init.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/news/tcl/test/news-db-test-init.tcl 8 Nov 2010 11:44:42 -0000 1.9 +++ openacs-4/packages/news/tcl/test/news-db-test-init.tcl 6 Sep 2013 16:46:28 -0000 1.10 @@ -561,9 +561,9 @@ aa_log "Check the correct groups have the right privileges." aa_true "Check public have news_read privilege" \ - [ad_permission_p $the_public_id news_read] + [permission::permission_p -object_id $the_public_id -privilege news_read] aa_true "Check registered_users have news_create privilege" \ - [ad_permission_p $registered_users_id news_read] + [permission::permission_p -object_id $registered_users_id -privilege news_read] } Index: openacs-4/packages/news/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/index.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/news/www/index.tcl 9 Nov 2008 23:29:28 -0000 1.16 +++ openacs-4/packages/news/www/index.tcl 6 Sep 2013 16:46:28 -0000 1.17 @@ -25,7 +25,7 @@ set package_id [ad_conn package_id] -ad_require_permission $package_id news_read +permission::require_permission -object_id $package_id -privilege news_read set context {} @@ -57,8 +57,8 @@ } # switches for privilege-enabled links: admin for news_admin, submit for registered users -set news_admin_p [ad_permission_p $package_id news_admin] -set news_create_p [ad_permission_p $package_id news_create] +set news_admin_p [permission::permission_p -object_id $package_id -privilege news_admin] +set news_create_p [permission::permission_p -object_id $package_id -privilege news_create] if { $news_admin_p } { lappend actions_list [_ news.Create_a_news_item] \ Index: openacs-4/packages/news/www/item-create-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item-create-3.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/news/www/item-create-3.tcl 30 Dec 2009 23:13:36 -0000 1.14 +++ openacs-4/packages/news/www/item-create-3.tcl 6 Sep 2013 16:46:28 -0000 1.15 @@ -26,10 +26,10 @@ # news_create permissions set package_id [ad_conn package_id] -ad_require_permission $package_id news_create +permission::require_permission -object_id $package_id -privilege news_create -set news_admin_p [ad_permission_p $package_id news_admin] +set news_admin_p [permission::permission_p -object_id $package_id -privilege news_admin] # get instance-wide approval policy : [closed|wait|open] set approval_policy [ad_parameter ApprovalPolicy "news" "wait"] Index: openacs-4/packages/news/www/item-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item-create.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/news/www/item-create.tcl 30 Dec 2009 23:13:36 -0000 1.11 +++ openacs-4/packages/news/www/item-create.tcl 6 Sep 2013 16:46:28 -0000 1.12 @@ -21,12 +21,12 @@ # Authorization by news_create set package_id [ad_conn package_id] -ad_require_permission $package_id news_create +permission::require_permission -object_id $package_id -privilege news_create # Furthermore, with news_admin privilege, items are approved immediately # or if open approval policy -if { [ad_permission_p $package_id news_admin] || [string equal "open" [ad_parameter ApprovalPolicy "news" "open"]] } { +if { [permission::permission_p -object_id $package_id -privilege news_admin] || [string equal "open" [ad_parameter ApprovalPolicy "news" "open"]] } { set immediate_approve_p 1 } else { set immediate_approve_p 0 Index: openacs-4/packages/news/www/item.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/news/www/item.tcl 30 Dec 2009 23:13:36 -0000 1.18 +++ openacs-4/packages/news/www/item.tcl 6 Sep 2013 16:46:28 -0000 1.19 @@ -42,7 +42,7 @@ set footer_links [list] if { [ad_parameter SolicitCommentsP "news" 0] && - [ad_permission_p $item_id general_comments_create] } { + [permission::permission_p -object_id $item_id -privilege general_comments_create] } { lappend footer_links [general_comments_create_link \ -link_attributes { class="button" } \ Index: openacs-4/packages/news/www/preview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/preview.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/news/www/preview.tcl 30 Dec 2009 23:24:44 -0000 1.27 +++ openacs-4/packages/news/www/preview.tcl 6 Sep 2013 16:46:28 -0000 1.28 @@ -58,9 +58,9 @@ set package_id [ad_conn package_id] # only people with at least write-permission beyond this point -ad_require_permission $package_id news_create +permission::require_permission -object_id $package_id -privilege news_create -set news_admin_p [ad_permission_p $package_id news_admin] +set news_admin_p [permission::permission_p -object_id $package_id -privilege news_admin] # Template parser treats publish_body.format as an array reference set publish_format ${publish_body.format}