Index: openacs-4/packages/download/tcl/download-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/tcl/download-procs.tcl,v diff -u -r1.12 -r1.12.2.1 --- openacs-4/packages/download/tcl/download-procs.tcl 1 Mar 2005 00:01:29 -0000 1.12 +++ openacs-4/packages/download/tcl/download-procs.tcl 6 Sep 2013 16:36:34 -0000 1.12.2.1 @@ -19,7 +19,7 @@ } -column_array repository ] } { #Package not setup if { $do_redirect } { - set admin_p [ad_permission_p $package_id "admin"] + set admin_p [permission::permission_p -object_id $package_id -privilege "admin"] if { $admin_p } { set repository_id [db_nextval acs_object_id_seq] set return_url "[ad_conn package_url]admin/repository-types" @@ -139,7 +139,7 @@ ad_script_abort } - ad_require_permission $revision_id "read" + permission::require_permission -object_id $revision_id -privilege "read" ##Record the download for all time!! set double_click_p [db_string download_count "select count(*) from download_downloads where download_id = :download_id"] Index: openacs-4/packages/download/www/archive-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add-2.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/download/www/archive-add-2.tcl 24 Mar 2004 03:33:42 -0000 1.3 +++ openacs-4/packages/download/www/archive-add-2.tcl 6 Sep 2013 16:36:34 -0000 1.3.2.1 @@ -27,10 +27,10 @@ ##Then insert into the download_revision_data set user_id [ad_conn user_id] set package_id [ad_conn package_id] -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] # check for write permission on this repository -ad_require_permission $repository_id write +permission::require_permission -object_id $repository_id -privilege write set approved_p [ad_decode $admin_p 0 [db_null] "t"] set approved_date [ad_decode $admin_p 0 [db_null] "sysdate"] Index: openacs-4/packages/download/www/archive-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/download/www/archive-add.tcl 1 Mar 2005 00:01:29 -0000 1.4 +++ openacs-4/packages/download/www/archive-add.tcl 6 Sep 2013 16:36:34 -0000 1.4.2.1 @@ -19,7 +19,7 @@ set description $repository(description) set help_text $repository(help_text) -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] set extra_form_elts "" db_foreach metadata { Index: openacs-4/packages/download/www/archive-version-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add-2.tcl,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/download/www/archive-version-add-2.tcl 10 Sep 2002 22:22:34 -0000 1.2 +++ openacs-4/packages/download/www/archive-version-add-2.tcl 6 Sep 2013 16:36:34 -0000 1.2.12.1 @@ -24,10 +24,10 @@ ##Then insert into the download_revision_data set repository_id [download_repository_id] set user_id [ad_conn user_id] -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] # check for write permission on this folder -ad_require_permission $archive_id write +permission::require_permission -object_id $archive_id -privilege write set approved_p [ad_decode $admin_p 0 [db_null] "t"] set approved_date [ad_decode $admin_p 0 [db_null] "sysdate"] Index: openacs-4/packages/download/www/archive-version-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/download/www/archive-version-add.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/archive-version-add.tcl 6 Sep 2013 16:36:34 -0000 1.5.2.1 @@ -16,7 +16,7 @@ auth::require_login set repository_id [download_repository_id] -ad_require_permission $archive_id write +permission::require_permission -object_id $archive_id -privilege write if ![db_0or1row archive_info_select { select da.archive_name, Index: openacs-4/packages/download/www/download-verify.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/download-verify.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/download/www/download-verify.tcl 1 Mar 2005 00:01:29 -0000 1.8 +++ openacs-4/packages/download/www/download-verify.tcl 6 Sep 2013 16:36:34 -0000 1.8.2.1 @@ -12,9 +12,9 @@ set repository_id [download_repository_id] auth::require_login -ad_require_permission $revision_id "read" +permission::require_permission -object_id $revision_id -privilege "read" -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] set approval "" if { $admin_p == 0 } { set approval "and dar.approved_p = 't'" Index: openacs-4/packages/download/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/index.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/download/www/index.tcl 1 Mar 2005 00:01:29 -0000 1.8 +++ openacs-4/packages/download/www/index.tcl 6 Sep 2013 16:36:34 -0000 1.8.2.1 @@ -24,9 +24,9 @@ array set repository [download_repository_info] set repository_id $repository(repository_id) -set master_admin_p [ad_permission_p [ad_conn package_id] admin] -set admin_p [ad_permission_p $repository_id admin] -set write_p [ad_permission_p $repository_id write] +set master_admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] +set write_p [permission::permission_p -object_id $repository_id -privilege write] set title $repository(title) set description $repository(description) Index: openacs-4/packages/download/www/one-archive.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-archive.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/download/www/one-archive.tcl 24 Feb 2005 13:33:12 -0000 1.8 +++ openacs-4/packages/download/www/one-archive.tcl 6 Sep 2013 16:36:34 -0000 1.8.2.1 @@ -9,11 +9,11 @@ archive_id:integer,notnull } -ad_require_permission $archive_id read +permission::require_permission -object_id $archive_id -privilege read -set master_admin_p [ad_permission_p [ad_conn package_id] admin] -set admin_p [ad_permission_p $archive_id admin] -set write_p [ad_permission_p $archive_id write] +set master_admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] +set admin_p [permission::permission_p -object_id $archive_id -privilege admin] +set write_p [permission::permission_p -object_id $archive_id -privilege write] if ![db_0or1row archive_info_select { select da.archive_name, Index: openacs-4/packages/download/www/one-revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-revision.tcl,v diff -u -r1.10 -r1.10.2.1 --- openacs-4/packages/download/www/one-revision.tcl 24 Feb 2005 13:33:12 -0000 1.10 +++ openacs-4/packages/download/www/one-revision.tcl 6 Sep 2013 16:36:34 -0000 1.10.2.1 @@ -13,11 +13,11 @@ } set repository_id [download_repository_id] -set admin_p [ad_permission_p $revision_id "admin"] -set master_admin_p [ad_permission_p [ad_conn package_id] admin] +set admin_p [permission::permission_p -object_id $revision_id -privilege "admin"] +set master_admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] ##FIXME: Need to do the metadata thing here! -ad_require_permission $revision_id "read" +permission::require_permission -object_id $revision_id -privilege "read" set archive_type_id [db_string get_archive_type "select archive_type_id from download_arch_revisions_obj dar, download_archives da where dar.archive_id = da.archive_id and dar.revision_id = :revision_id"] Index: openacs-4/packages/download/www/admin/approve-or-reject-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/approve-or-reject-2.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/download/www/admin/approve-or-reject-2.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/approve-or-reject-2.tcl 6 Sep 2013 16:36:34 -0000 1.5.2.1 @@ -22,7 +22,7 @@ set repository_id $repository_info(repository_id) set user_id [ad_conn user_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" if { $action == "approve" } { set approved_p "t" Index: openacs-4/packages/download/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/index.tcl,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/download/www/admin/index.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/index.tcl 6 Sep 2013 16:36:34 -0000 1.2.12.1 @@ -13,6 +13,6 @@ set description $repository(description) set help_text $repository(help_text) -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-version-downloads.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads.tcl,v diff -u -r1.6 -r1.6.8.1 --- openacs-4/packages/download/www/admin/report-version-downloads.tcl 16 Jan 2003 13:46:20 -0000 1.6 +++ openacs-4/packages/download/www/admin/report-version-downloads.tcl 6 Sep 2013 16:36:34 -0000 1.6.8.1 @@ -21,7 +21,7 @@ set repository_id [download_repository_id] -ad_require_permission $archive_id "admin" +permission::require_permission -object_id $archive_id -privilege "admin" set dimensional { {versions "Versions" current { Index: openacs-4/packages/download/www/admin/repository-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-ae.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/download/www/admin/repository-ae.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/repository-ae.tcl 6 Sep 2013 16:36:34 -0000 1.5.2.1 @@ -11,7 +11,7 @@ set package_id [ad_conn package_id] set user_id [ad_conn user_id] -ad_require_permission $package_id "admin" +permission::require_permission -object_id $package_id -privilege "admin" form create ae_repository element create ae_repository return_url -label "ReturnUrl" -datatype text -widget hidden Index: openacs-4/packages/download/www/admin/repository-metadata-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-delete.tcl,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/download/www/admin/repository-metadata-delete.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/repository-metadata-delete.tcl 6 Sep 2013 16:36:35 -0000 1.2.12.1 @@ -9,7 +9,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_dml metadata_delete { delete from download_archive_metadata where metadata_id = :metadata_id Index: openacs-4/packages/download/www/admin/repository-metadata-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-edit.tcl,v diff -u -r1.4 -r1.4.12.1 --- openacs-4/packages/download/www/admin/repository-metadata-edit.tcl 18 Sep 2002 13:06:33 -0000 1.4 +++ openacs-4/packages/download/www/admin/repository-metadata-edit.tcl 6 Sep 2013 16:36:35 -0000 1.4.12.1 @@ -11,7 +11,7 @@ set context [list "Metadata edit"] set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_0or1row metadata_select { select Index: openacs-4/packages/download/www/admin/repository-reasons-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons-delete.tcl,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/download/www/admin/repository-reasons-delete.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/repository-reasons-delete.tcl 6 Sep 2013 16:36:35 -0000 1.2.12.1 @@ -9,7 +9,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_dml reason_delete { delete from download_reasons where download_reason_id = :download_reason_id Index: openacs-4/packages/download/www/admin/repository-reasons-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons-edit.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/download/www/admin/repository-reasons-edit.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/repository-reasons-edit.tcl 6 Sep 2013 16:36:35 -0000 1.5.2.1 @@ -11,7 +11,7 @@ set repository_id [download_repository_id] set user_id [ad_conn user_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" form create edit_reason element create edit_reason download_reason_id -label "Reason ID" -datatype integer -widget hidden Index: openacs-4/packages/download/www/admin/repository-reasons.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons.tcl,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/download/www/admin/repository-reasons.tcl 10 Sep 2002 22:22:35 -0000 1.3 +++ openacs-4/packages/download/www/admin/repository-reasons.tcl 6 Sep 2013 16:36:35 -0000 1.3.12.1 @@ -8,7 +8,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" set title "Download Repository Download Reasons" set context [list "Download Reasons"] Index: openacs-4/packages/download/www/admin/repository-types-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types-delete.tcl,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/download/www/admin/repository-types-delete.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/repository-types-delete.tcl 6 Sep 2013 16:36:35 -0000 1.2.12.1 @@ -9,7 +9,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_dml type_delete { delete from download_archive_types where repository_id = :repository_id and archive_type_id = :archive_type_id Index: openacs-4/packages/download/www/admin/repository-types-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types-edit.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/download/www/admin/repository-types-edit.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/repository-types-edit.tcl 6 Sep 2013 16:36:35 -0000 1.5.2.1 @@ -11,7 +11,7 @@ set repository_id [download_repository_id] set user_id [ad_conn user_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" form create edit_type element create edit_type archive_type_id -label "ArchiveType ID" -datatype integer -widget hidden Index: openacs-4/packages/download/www/admin/repository-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types.tcl,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/download/www/admin/repository-types.tcl 10 Sep 2002 22:22:35 -0000 1.3 +++ openacs-4/packages/download/www/admin/repository-types.tcl 6 Sep 2013 16:36:35 -0000 1.3.12.1 @@ -8,7 +8,7 @@ } set repository_id [download_repository_id [ad_conn package_id] 0] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" set title "Download Repository Archive Types" set context [list "Archive Types"] Index: openacs-4/packages/download/www/admin/spam-users-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/spam-users-2.tcl,v diff -u -r1.6 -r1.6.2.1 --- openacs-4/packages/download/www/admin/spam-users-2.tcl 1 Mar 2005 00:01:29 -0000 1.6 +++ openacs-4/packages/download/www/admin/spam-users-2.tcl 6 Sep 2013 16:36:35 -0000 1.6.2.1 @@ -10,7 +10,7 @@ msgbody:notnull } -ad_require_permission [ad_conn package_id] "admin" +permission::require_permission -object_id [ad_conn package_id] -privilege "admin" set user_id [ad_conn user_id] Index: openacs-4/packages/download/www/admin/spam-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/spam-users.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/download/www/admin/spam-users.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/spam-users.tcl 6 Sep 2013 16:36:35 -0000 1.5.2.1 @@ -14,7 +14,7 @@ no_spam_count:onevalue } -ad_require_permission [ad_conn package_id] "admin" +permission::require_permission -object_id [ad_conn package_id] -privilege "admin" set user_id [ad_conn user_id] # get name, email and