[PATCH conductor] bug 807752: appropriate error message for permission denied on HWP deletion
Scott Seago
sseago at redhat.com
Tue Sep 4 15:37:51 UTC 2012
https://bugzilla.redhat.com/show_bug.cgi?id=807752
---
src/app/controllers/hardware_profiles_controller.rb | 2 +-
src/config/locales/en.yml | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/app/controllers/hardware_profiles_controller.rb b/src/app/controllers/hardware_profiles_controller.rb
index 52532dc..1c530d8 100644
--- a/src/app/controllers/hardware_profiles_controller.rb
+++ b/src/app/controllers/hardware_profiles_controller.rb
@@ -180,7 +180,7 @@ class HardwareProfilesController < ApplicationController
flash[:notice] = t('hardware_profiles.flash.notice.more_deleted', :count => deleted.count, :deleted => deleted.join(', '))
end
unless not_deleted.empty?
- flash[:error] = t('hardware_profiles.flash.error.more_not_deleted', :count => not_deleted.count, :not_deleted => not_deleted.join(', '))
+ flash[:error] = t('hardware_profiles.flash.error.not_deleted_perms', :count => not_deleted.count, :not_deleted => not_deleted.join(', '))
end
redirect_to hardware_profiles_path
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 4ece991..8d16187 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -701,6 +701,9 @@ en:
more_not_deleted:
one: "%{not_deleted} could not be deleted"
other: "Could not delete the following hardware profiles: %{not_deleted}"
+ not_deleted_perms:
+ one: "Insufficient permissions to delete hardware profile %{not_deleted}"
+ other: "Insufficient permissions to remove %{count} hardware profiles %{not_deleted}"
warning:
cannot_edit_backend_hwp: "Cannot modify Provider Hardware Profiles"
cannot_delete_backend_hwp: "Cannot delete Provider Hardware Profiles"
--
1.7.11.4
More information about the aeolus-devel
mailing list