FIX: moderators should not be able to see site setting changes in the staff action logs. Fixes #2027

This commit is contained in:
Neil Lalonde
2014-02-28 16:30:45 -05:00
parent 47357136dc
commit b40313559b
4 changed files with 49 additions and 2 deletions

View File

@ -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