if the user is not allowed to know anything about Michael Johnson, then probably the backend should not send down that resource, or any events for that resource.
Support Forum
Dear Animal,
Thank you for your response. I feel that it would be necessary to clarify the use case first. Those who use the Calendar can access and view all events for every Resource, but they cannot modify every Resource. We see two possible solutions to address this:
When a user tries to create or modify an event and does not have access to the specific Resource, the open Modal should not close, and an error message should be displayed to the user, indicating that they do not have access to this Resource.
The second option, which we’ve already started discussing, is that when users open a new event, only the Resources they have access to are offered. Additionally, if they see an event in the calendar but do not have access to its Resource, they should be prevented from opening, copying, duplicating, or deleting that event.
In summary, everyone can see all events for every Resource, but different users can only edit specific Resources.
What do you think about this? How should this be handled in the Calendar?
I really appreciate your answer.
Best Regards,
Adri
if they see an event in the calendar but do not have access to its Resource, they should be prevented from opening, copying, duplicating, or deleting that event.
That should be possible in beforeEventEdit
. Add a listener and stop the edit if they do not have access to its resources.
You can use processContextMenuItems
to hide/show cut/copy/paste options depending on the selection as in https://bryntum.com/products/calendar/examples/custom-menus/
processContextMenuItems({ eventRecord, items }) {
items.allDay.text = eventRecord.allDay ? 'Make intraday' : 'Make all day';
},
And there's the beforeEventDelete
event to prevent deletion.