strapi-calendar icon indicating copy to clipboard operation
strapi-calendar copied to clipboard

Showing in calendar only the events that are created by the logged in user

Open alexbudin opened this issue 7 months ago • 2 comments

I love this plugin and hopefully you might be able to continue work on it.

Can you please help me with any piece of code that i can add so that:

  1. The calendar access in admin can be set in permissions
  2. the calendar events being shown in the calendar view are events that the logged in user has access to. At the moment i have an event content type that is set in permissions so that only the creators can see their own events but not see others events (its set using the Strapi V5 permissions from the admin), but in the calendar the user can see ALL events

Thank you so much!

Alex

alexbudin avatar Apr 22 '25 22:04 alexbudin

@LuisRodriguezLD im sure you are busy, but do you think you can offer a bit of help here? Thank you so much!

alexbudin avatar Apr 23 '25 14:04 alexbudin

Hey, so right now I don't have that implemented but it seems what you would want to do is sanitize the results before sending them back to the client https://docs.strapi.io/cms/backend-customization/controllers#sanitize-validate-custom-controllers

if that becomes troublesome (because the collection is dynamic) I would try doing it manually

the controller would need to send the user to the service https://docs.strapi.io/cms/backend-customization/requests-responses#ctxstateuser

inside the service, we can get the permissions the role has and filter out data

LuisRodriguezLD avatar Apr 24 '25 03:04 LuisRodriguezLD