mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 08:26:02 +08:00
FIX: moderators should not be able to see site setting changes in the staff action logs. Fixes #2027
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
class AddAdminOnlyToUserHistories < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :user_histories, :admin_only, :boolean, default: false
|
||||
execute "UPDATE user_histories SET admin_only = true WHERE action = #{UserHistory.actions[:change_site_setting]}"
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :user_histories, :admin_only
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user