strapi-calendar
strapi-calendar copied to clipboard
Showing in calendar only the events that are created by the logged in user
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:
- The calendar access in admin can be set in permissions
- 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
@LuisRodriguezLD im sure you are busy, but do you think you can offer a bit of help here? Thank you so much!
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