[Kimchi-devel] [PATCH] Bugfix #479: Allow non-admin users get devices passthrough information

Aline Manera alinefm at linux.vnet.ibm.com
Mon Dec 8 13:35:37 UTC 2014


The API /host/devices is used in many places (such as to create a SCSI
FC pool or to list the PCI passthrough devices).
As the PCI passthrough devices might be accessible for non-admin users
the authorization configuration to that API was reset.

Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
 src/kimchi/control/host.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/kimchi/control/host.py b/src/kimchi/control/host.py
index 3592388..c690945 100644
--- a/src/kimchi/control/host.py
+++ b/src/kimchi/control/host.py
@@ -96,8 +96,6 @@ class Partition(Resource):
 class Devices(Collection):
     def __init__(self, model):
         super(Devices, self).__init__(model)
-        self.role_key = 'storage'
-        self.admin_methods = ['GET']
         self.resource = Device
 
 
@@ -109,8 +107,6 @@ class VMHolders(SimpleCollection):
 
 class Device(Resource):
     def __init__(self, model, id):
-        self.role_key = 'storage'
-        self.admin_methods = ['GET']
         super(Device, self).__init__(model, id)
         self.vm_holders = VMHolders(self.model, id)
 
-- 
1.9.3




More information about the Kimchi-devel mailing list