Send a notification when security settings are changed (#21421).

git-svn-id: http://svn.redmine.org/redmine/trunk@15148 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-02-05 08:50:21 +00:00
parent c46c0e7452
commit b5366eb307
9 changed files with 116 additions and 4 deletions

View File

@@ -33,10 +33,7 @@ class SettingsController < ApplicationController
def edit
@notifiables = Redmine::Notifiable.all
if request.post? && params[:settings] && params[:settings].is_a?(Hash)
settings = (params[:settings] || {}).dup.symbolize_keys
settings.each do |name, value|
Setting.set_from_params name, value
end
Setting.set_all_from_params(params[:settings])
flash[:notice] = l(:notice_successful_update)
redirect_to settings_path(:tab => params[:tab])
else