Index: openacs-4/packages/calendar/calendar.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/calendar.info,v diff -u -r1.47.2.16 -r1.47.2.17 --- openacs-4/packages/calendar/calendar.info 13 Jul 2023 13:12:31 -0000 1.47.2.16 +++ openacs-4/packages/calendar/calendar.info 31 Jan 2024 10:27:02 -0000 1.47.2.17 @@ -7,7 +7,7 @@ f f - + Dirk Gomez Personal and shared event calendars. 2023-05-29 @@ -17,7 +17,7 @@ 2 #calendar.Calendar# - + Index: openacs-4/packages/calendar/www/cal-item-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-new.tcl,v diff -u -r1.41.2.17 -r1.41.2.18 --- openacs-4/packages/calendar/www/cal-item-new.tcl 28 Feb 2023 09:28:40 -0000 1.41.2.17 +++ openacs-4/packages/calendar/www/cal-item-new.tcl 31 Jan 2024 10:27:02 -0000 1.41.2.18 @@ -184,7 +184,10 @@ } -edit_request { - permission::require_write_permission -object_id $cal_item_id -creation_user $cal_item(creation_user) + ::permission::require_permission \ + -object_id $cal_item_id \ + -privilege write \ + -party_id $user_id set cal_item_id $cal_item(cal_item_id) set n_attachments $cal_item(n_attachments) @@ -247,7 +250,10 @@ set end_date "$date $end_time" if { ![calendar::personal_p -calendar_id $calendar_id] } { - permission::require_permission -object_id $calendar_id -privilege create + ::permission::require_permission \ + -object_id $calendar_id \ + -privilege create \ + -party_id $user_id } set cal_item_id [calendar::item::new \ -start_date $start_date \ @@ -270,10 +276,23 @@ } -edit_data { - # Require write permission on the item and create on the calendar into which we're putting it - permission::require_write_permission -object_id $cal_item_id + # + # Require write permission to write on the item. + # + ::permission::require_permission \ + -object_id $cal_item_id \ + -privilege write \ + -party_id $user_id + + # + # When the calendar is not personal, also require the permission + # to create in it. + # if { ![calendar::personal_p -calendar_id $calendar_id] } { - permission::require_permission -object_id $calendar_id -privilege create + ::permission::require_permission \ + -object_id $calendar_id \ + -privilege create \ + -party_id $user_id } # set up the datetimes Index: openacs-4/packages/calendar/www/cal-item-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-view.tcl,v diff -u -r1.27.2.4 -r1.27.2.5 --- openacs-4/packages/calendar/www/cal-item-view.tcl 24 Feb 2023 13:04:50 -0000 1.27.2.4 +++ openacs-4/packages/calendar/www/cal-item-view.tcl 31 Jan 2024 10:27:02 -0000 1.27.2.5 @@ -9,8 +9,13 @@ {return_url:localurl [ad_return_url]} } -permission::require_permission -object_id $cal_item_id -privilege read +set user_id [ad_conn user_id] +::permission::require_permission \ + -object_id $cal_item_id \ + -privilege read \ + -party_id $user_id + calendar::item::get -cal_item_id $cal_item_id -array cal_item # Honor the related link redirection facility long implemented in acs-events, but @@ -21,7 +26,10 @@ ad_script_abort } -set write_p [permission::write_permission_p -object_id $cal_item_id -creation_user $cal_item(creation_user)] +set write_p [::permission::permission_p \ + -object_id $cal_item_id \ + -privilege write \ + -party_id $user_id] multirow create attachments item_id label href detach_url # Attachments?