DEV: Drop hidden setting which was making holiday status public (#337)
This commit is contained in:
parent
b810360aff
commit
e0efb16264
|
@ -5,9 +5,6 @@ discourse_calendar:
|
||||||
holiday_calendar_topic_id:
|
holiday_calendar_topic_id:
|
||||||
default: ""
|
default: ""
|
||||||
client: true
|
client: true
|
||||||
holiday_calendar_users_public:
|
|
||||||
default: false
|
|
||||||
hidden: true
|
|
||||||
delete_expired_event_posts_after:
|
delete_expired_event_posts_after:
|
||||||
min: -1
|
min: -1
|
||||||
default: -1
|
default: -1
|
||||||
|
|
|
@ -508,7 +508,7 @@ after_initialize do
|
||||||
DiscourseCalendar.users_on_holiday
|
DiscourseCalendar.users_on_holiday
|
||||||
end
|
end
|
||||||
|
|
||||||
add_to_serializer(:site, :include_users_on_holiday?) { SiteSetting.holiday_calendar_users_public || scope.is_staff? }
|
add_to_serializer(:site, :include_users_on_holiday?) { scope.is_staff? }
|
||||||
|
|
||||||
reloadable_patch do
|
reloadable_patch do
|
||||||
module DiscoursePostEvent::ExportCsvControllerExtension
|
module DiscoursePostEvent::ExportCsvControllerExtension
|
||||||
|
|
|
@ -24,11 +24,4 @@ describe "calendar site additions" do
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
expect(response.parsed_body["users_on_holiday"]).to eq([user.username])
|
expect(response.parsed_body["users_on_holiday"]).to eq([user.username])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "makes it public when enabled" do
|
|
||||||
SiteSetting.holiday_calendar_users_public = true
|
|
||||||
get "/site.json"
|
|
||||||
expect(response.status).to eq(200)
|
|
||||||
expect(response.parsed_body["users_on_holiday"]).to eq([user.username])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue