Conditional-ACK; code works as intended, but I'm not sure why there's an option
for a user to delete his own account from the "my account" page in the first
place. . . ? There's already an admin page where an administrator can do so.
Mainn
----- Original Message -----
From: "Matt Wagner" <matt.wagner(a)redhat.com>
To: aeolus-devel(a)lists.fedorahosted.org
Sent: Thursday, March 1, 2012 12:53:33 PM
Subject: [PATCH conductor] BZ 798515 - Render correct error message when deleting user
We were displaying the entirely wrong flash message and passing in the wrong
argument for it, causing an interpolation error.
Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=798515
---
src/app/controllers/users_controller.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/users_controller.rb
b/src/app/controllers/users_controller.rb
index 493fb4d..93918bc 100644
--- a/src/app/controllers/users_controller.rb
+++ b/src/app/controllers/users_controller.rb
@@ -139,7 +139,7 @@ class UsersController < ApplicationController
require_privilege(Privilege::MODIFY, User)
user = User.find(params[:id])
if user == current_user
- flash[:warning] = "#{t('users.flash.warning.not_delete', :login =>
"#{user.login}")}"
+ flash[:warning] = "#{t('users.flash.warning.not_delete_same_user',
:login => "#{user.login}")}"
else
user.destroy
flash[:notice] = t"users.flash.notice.deleted"
--
1.7.7.6