Public events can't be created by users who can't see TL0 group

I think the problem is that the trust_level_0 group on your site cannot be seen by the user, even though see is a member of it. To confirm that, can you check the Interaction tab of your site’s trust_level_0 group’s management page?

My guess is that the value of the “Who can see this group” setting will be either “Group owners and moderators” or “Group owners.” I think the plugin’s code makes the assumption that the trust_level_0 group will always be configured so that it can be seen by “Everyone.”

If this is correct, you could fix the issue for now by changing the group’s visibility setting back to its default value of “Everyone.”

This might be considered to be a bug in the plugin. When a public event is created, the code that’s used to create the event looks something like this:

[event start="2023-10-05 16:00" status="public" timezone="America/Vancouver" end="2023-10-05 17:00" allowedGroups="trust_level_0"]
[/event]

Note that the value of allowedGroups is automatically set to trust_level_0 for public events. It is possible for users to be members of the TL0 group but not be able to “see” it. In this case, these users will not be able to create public events.

For reference, the relevant code is here: discourse-calendar/lib/discourse_post_event/event_validator.rb at main · discourse/discourse-calendar · GitHub

3 Likes