new ui member account privilege fix

This commit is contained in:
Spen authored and saurabhbhatia committed 2013-10-21 10:42:50 +08:00
1 parent f9f2232259
commit c76adc1896
4 files changed
+16 -2

No files matched your search

@@ -275,6 +275,18 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
render :action => :setting_account, :notice => flash.now[:error]
end
elsif params[:edit_type] == 'edit_privilege'
if @user.admin && current_user.id == @user.id
flash.now[:error] = t("users.admin_change_password")
end
if !flash.now[:error] && @user.update_attributes(params[:user])
redirect_to :action => :show
else
render :action => :edit_privilege, :notice => flash.now[:error]
end
else
@user.update_attributes(params[:user])