mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 06:43:54 +08:00
e94ab11477
When we turn on settings automatically for customers, we sometimes use `.set_and_log` which will make a staff action log for the site setting change. This is fine, but there is no context for customers. This change allows setting a message with `.set_and_log`, which will be stored in the `details` column of the staff action log created, which will show up on `/admin/logs/staff_action_logs` --------- Co-authored-by: Kelv <kelv@discourse.org>
17 lines
502 B
Ruby
17 lines
502 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:user_history) { acting_user { Fabricate(:user) } }
|
|
|
|
Fabricator(:site_setting_change_history, from: :user_history) do
|
|
action { UserHistory.actions[:change_site_setting] }
|
|
previous_value { "old value" }
|
|
new_value { "new value" }
|
|
subject { "some_site_setting" }
|
|
end
|
|
|
|
Fabricator(:topic_closed_change_history, from: :user_history) do
|
|
action { UserHistory.actions[:topic_closed] }
|
|
subject { "some_site_setting" }
|
|
topic_id { Fabricate(:topic).id }
|
|
end
|