Permission Error While Cancelling Appointment Created by Another User

Hi all,

I’m facing a permission issue in my Frappe app.

image

Here’s the scenario:

  • User1 creates an Appointment.
  • User2 tries to cancel the same appointment.
  • While cancelling, the system shows the following error:

Not permitted
Not allowed via controller permission check
User user2 does not have access to this document: Event - EV00044
You need the 'write' permission on Event EV00044 to perform this action.

It seems that the Event linked to the appointment is not writable by User2.

Can someone help me understand:

  • Why does this error occur when a different user tries to cancel the appointment?
  • How can I configure permissions so that User2 (or users with appropriate roles) can cancel appointments not created by them?
  • Do I need to update Role Permission Manager, or should I apply document-level sharing for the Event doctype?

Thanks in advance!

Give him cancle and amend permission