pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0047-Give-more-info-on-virtual-command-access-denial.patch

590d18
From 7416358e95e69a517424319ac31dfcc68bda2878 Mon Sep 17 00:00:00 2001
590d18
From: Fraser Tweedale <ftweedal@redhat.com>
590d18
Date: Sun, 9 Aug 2015 01:54:41 -0400
590d18
Subject: [PATCH] Give more info on virtual command access denial
590d18
590d18
The current error message upon a virutal command access denial does
590d18
not give any information about the virtual operation that was
590d18
prohibited.  Add more information to the ACIError message.
590d18
590d18
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
590d18
---
590d18
 ipalib/plugins/virtual.py | 2 +-
590d18
 1 file changed, 1 insertion(+), 1 deletion(-)
590d18
590d18
diff --git a/ipalib/plugins/virtual.py b/ipalib/plugins/virtual.py
590d18
index 414de4c0011b4ae49083d7820a3cb3708e3e16b1..3bbe32e538ab108d7abc71785e27664fea5ea248 100644
590d18
--- a/ipalib/plugins/virtual.py
590d18
+++ b/ipalib/plugins/virtual.py
590d18
@@ -62,7 +62,7 @@ class VirtualCommand(Command):
590d18
         try:
590d18
             if not ldap.can_write(operationdn, "objectclass"):
590d18
                 raise errors.ACIError(
590d18
-                    info=_('not allowed to perform this command'))
590d18
+                    info=_('not allowed to perform operation: %s') % operation)
590d18
         except errors.NotFound:
590d18
             raise errors.ACIError(info=_('No such virtual command'))
590d18
 
590d18
-- 
590d18
2.4.3
590d18