TL0 그룹을 볼 수 없는 사용자는 공개 이벤트를 생성할 수 없습니다

I also have a user who cannot create an event, they get the error “An error occured: Invalid allowed groups.” and the allowed group in the event is the default trust_level_0, she is in an allowed group in the site setting discourse post event allowed on groups, any ideas?

2개의 좋아요

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개의 좋아요

That was the problem, thank you Simon!

3개의 좋아요

추적을 쉽게 하기 위해 당분간 버그 카테고리로 이동하겠습니다. TL0 그룹을 볼 수 없는 사용자가 공개 이벤트를 생성하는 것을 방지하는 것이 의도된 동작이라면, 이 문제는 Contribute > UX 카테고리로 다시 분류될 수 있습니다.

4개의 좋아요

That was great deduction…
Some error messages could bring more details depending on the context so we can find more easily where the issue comes from.

3개의 좋아요

FYI I got a similar error message, but it is due to using a non-English language. I started a new topic here: Calendar plugin needs group visibility