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/requests
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
..
admin FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
api FEATURE: Embedded Zoom webinar for livestream events (#40973) 2026-07-16 10:58:56 +10:00
chat SECURITY: Remove stale invitee access for users removed from invited groups on private events (#42187) 2026-07-30 15:15:46 -05:00
calendar_subscriptions_spec.rb FEATURE: Add calendar subscription URLs to user preferences (#38598) 2026-03-17 10:28:20 -03:00
categories_controller_spec.rb FEATURE: Promote Ideas & Events category types to permanent status (#42080) 2026-07-29 09:20:40 +10:00
events_controller_spec.rb FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
group_timezones_spec.rb SECURITY: Group timezone serialization leaks hidden group members (#40873) 2026-06-15 12:51:05 +01:00
invitees_controller_spec.rb FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
livestream_controller_spec.rb FEATURE: Embedded Zoom webinar for livestream events (#40973) 2026-07-16 10:58:56 +10:00
private_event_group_invitees_spec.rb SECURITY: Remove stale invitee access for users removed from invited groups on private events (#42187) 2026-07-30 15:15:46 -05:00
site_spec.rb
sort_event_topics_spec.rb