[Kimchi-devel] [PATCH 3/3] authorization: Add "access" parameter to VM resource

alinefm at linux.vnet.ibm.com alinefm at linux.vnet.ibm.com
Tue Jul 15 19:44:29 UTC 2014


From: Aline Manera <alinefm at linux.vnet.ibm.com>

As the guests tab has by-instance mode when a normal user is logged into
Kimchi, each VM resource must specify the user access.
By now, if a user has access to a VM he/she will have full access to it
so add "access=full".

Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
 src/kimchi/mockmodel.py | 3 ++-
 src/kimchi/model/vms.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py
index d1cec70..0e45d1e 100644
--- a/src/kimchi/mockmodel.py
+++ b/src/kimchi/mockmodel.py
@@ -1050,7 +1050,8 @@ def __init__(self, uuid, name, template_info):
                      'graphics': {'type': 'vnc', 'listen': '0.0.0.0',
                                   'port': None},
                      'users': ['user1', 'user2', 'root'],
-                     'groups': ['group1', 'group2', 'admin']
+                     'groups': ['group1', 'group2', 'admin'],
+                     'access': 'full'
                      }
         self.info['graphics'].update(template_info['graphics'])
 
diff --git a/src/kimchi/model/vms.py b/src/kimchi/model/vms.py
index 17bda04..8c0dcb1 100644
--- a/src/kimchi/model/vms.py
+++ b/src/kimchi/model/vms.py
@@ -395,7 +395,8 @@ def lookup(self, name):
                              "listen": graphics_listen,
                              "port": graphics_port},
                 'users': users,
-                'groups': groups
+                'groups': groups,
+                'access': 'full'
                 }
 
     def _vm_get_disk_paths(self, dom):
-- 
1.9.3




More information about the Kimchi-devel mailing list