0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/discourse-calendar/spec
Martin Brennan 57779cc4be
FIX: can_create_discourse_post_event? not checking user groups correctly (#42284)
This commit fixes `can_create_discourse_post_event?` manually checking
a user's groups, which doesn't account for pseudogroups like
`logged_in_users`. We should always use `user.in_any_groups?` for this.

In addition, the opportunity is taken here for some cleanup, moving
all the guardian extensions from plugin.rb into a proper
`GuardianExtensions` file for calendar, adding extra specs along the
way.

Finally, I've added a `Group.refresh_automatic_groups_for_user!`
method as a single-user variant of `Group.refresh_automatic_groups!`
that can use in fabricators for testing, to make this more
thorough/reliable
than manually adding group user records in `after_create` in the
fabricators
2026-08-04 16:09:50 +10:00
..
fabricators UX: More Zoom livestream UI issues (#41824) 2026-07-27 15:31:41 +10:00
fixtures/csv UX: Rework the event bulk invite modal (#40496) 2026-06-18 10:38:34 +02:00
integration FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
jobs FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
lib FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
migrations FIX: Cook event location and description as inline markdown (#41994) 2026-07-28 18:59:23 +02:00
models FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
requests FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
serializers FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
services FEATURE: Promote Ideas & Events category types to permanent status (#42080) 2026-07-29 09:20:40 +10:00
system FIX: Sanitize calendar event tooltip HTML (#42215) 2026-07-31 10:28:47 -05:00