0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 08:06:54 +08:00
discourse/plugins/discourse-calendar/config/settings.yml
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

160 lines
3.7 KiB
YAML
Vendored

discourse_calendar:
calendar_enabled:
default: false
client: true
holiday_calendar_topic_id:
default: ""
client: true
holiday_status_emoji:
client: true
default: "date"
delete_expired_event_posts_after:
min: -1
default: -1
all_day_event_start_time:
default: ""
client: true
validator: "CalendarSettingsValidator"
all_day_event_end_time:
default: ""
client: true
validator: "CalendarSettingsValidator"
calendar_categories:
type: list
list_type: simple
client: true
default: ""
calendar_event_display:
client: true
default: "auto"
type: enum
choices:
- auto
- block
- list-item
calendar_categories_outlet:
client: true
default: "discovery-list-container-top"
type: enum
choices:
- none
- discovery-list-container-top
- before-topic-list-body
working_days:
type: list
list_type: simple
default: Monday|Tuesday|Wednesday|Thursday|Friday
client: true
working_day_start_hour:
default: 8
client: true
working_day_end_hour:
default: 17
client: true
close_to_working_day_hours_extension:
default: 2
client: true
calendar_automatic_holidays_enabled: true
split_grouped_events_by_timezone_threshold:
default: 0
client: true
hidden: true
event_participation_buttons:
default: "going|interested|not going"
client: true
type: list
list_type: simple
allow_any: false
choices:
- going
- interested
- not going
discourse_post_event_enabled:
default: false
client: true
discourse_post_event_allowed_on_groups:
client: true
type: group_list
list_type: compact
default: ""
allow_any: false
refresh: true
mandatory_values: "1|2" # admins, moderators
displayed_invitees_limit:
default: 10
client: false
max: 25
display_post_event_date_on_topic_title:
default: true
client: true
use_local_event_date:
default: false
client: true
discourse_post_event_max_bulk_invitees:
default: 500
hidden: true
discourse_post_event_edit_notifications_time_extension:
default: 0
min: 0
discourse_post_event_allowed_custom_fields:
type: list
list_type: simple
client: true
default: ""
validator: "CalendarCustomFieldsValidator"
events_calendar_categories:
type: category_list
client: true
default: ""
sort_categories_by_event_start_date_enabled:
default: false
client: true
disable_resorting_on_categories_enabled:
default: false
client: true
sidebar_show_upcoming_events:
default: true
client: true
map_events_to_color:
client: true
default: "[]"
json_schema: DiscourseCalendar::SiteSettings::MapEventTagColorsJsonSchema
map_events_title:
client: true
default: ""
json_schema: DiscourseCalendar::SiteSettings::MapEventsTitleJsonSchema
calendar_first_day_of_week:
type: enum
enum: "CalendarFirstDayOfWeek"
default: monday
client: true
calendar_upcoming_events_default_view:
type: enum
enum: "CalendarUpcomingEventsDefaultView"
default: month
client: true
enable_events_category_type_setup:
default: false
hidden: true
client: true
upcoming_change:
status: "permanent"
impact: "feature,staff"
learn_more_url: "https://meta.discourse.org/t/-/401309"
requires_plugin_enabled: false
livestream_zoom_enabled:
default: false
client: true
livestream_zoom_sdk_key:
default: ""
livestream_zoom_sdk_secret:
default: ""
secret: true
livestream_embeddable_chat_allowed_paths:
type: list
default: "/t"
client: true
hidden: true
livestream_enable_modal_chat_on_mobile:
default: true
client: true