Index: openacs-4/contrib/packages/project-manager/www/task-add-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit-2.tcl,v diff -u -r1.1.2.12 -r1.1.2.13 --- openacs-4/contrib/packages/project-manager/www/task-add-edit-2.tcl 30 Apr 2005 06:53:09 -0000 1.1.2.12 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit-2.tcl 4 May 2005 06:13:53 -0000 1.1.2.13 @@ -1,4 +1,4 @@ -# +# ad_page_contract { @@ -58,6 +58,9 @@ set package_id [ad_conn package_id] set peeraddr [ad_conn peeraddr] +# permissions +permission::require_permission -party_id $user_id -object_id $package_id -privilege read + set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] set hours_day [pm::util::hours_day] @@ -111,10 +114,6 @@ # EDITING # ------- - permission::require_permission \ - -party_id $user_id \ - -object_id $package_id \ - -privilege write # ----------------------------------------------------- # find out information about the task before we edit it @@ -189,7 +188,9 @@ # edit task # --------- + permission::require_permission -party_id $user_id -object_id $task_item_id($num) -privilege write + set dead_line "[set end_date_${num}(year)]-[set end_date_${num}(month)]-[set end_date_${num}(day)]" set task_revision \ [pm::task::edit \ @@ -257,11 +258,6 @@ # USING PROCESS OR CREATING NEW TASKS # ----------------------------------- - permission::require_permission \ - -party_id $user_id \ - -object_id $package_id \ - -privilege create - if {[string is true $using_process_p]} { set process_instance_id [pm::process::instantiate \ @@ -293,6 +289,8 @@ # create task # ----------- + permission::require_permission -party_id $user_id -object_id $project_item_id($num) -privilege create + set task_item \ [pm::task::new \ -project_id $project_item_id($num) \