From danielhb at linux.vnet.ibm.com Thu Jul 17 13:40:04 2014 Content-Type: multipart/mixed; boundary="===============5440026607008059130==" MIME-Version: 1.0 From: Daniel H Barboza To: kimchi-devel at ovirt.org Subject: Re: [Kimchi-devel] [PATCH 3/5] authorization: Add "access" elements to tabs.xml to describe user view Date: Thu, 17 Jul 2014 14:39:58 -0300 Message-ID: <53C80A6E.2080806@linux.vnet.ibm.com> In-Reply-To: 1405547552-29955-4-git-send-email-alinefm@linux.vnet.ibm.com --===============5440026607008059130== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reviewed-by: Daniel Barboza Tested-by: Daniel Barboza On 07/16/2014 06:52 PM, alinefm(a)linux.vnet.ibm.com wrote: > From: Aline Manera > > Kimchi has 2 user roles: "admin" with full control of Kimchi features > and "user" with limited access > To describe how each tab should be displayed to user, an "access" > element was added to tabs.xml indicating which view mode each role has. > > > > The "mode" attribute values are: > > - none: do not show the tab; > - admin: full instance access; > - read-only: read-only access; > - byInstance: each resource will have its configuration sent by the > backend ("access" parameter); > > The user will only be able to manage the guests he/she is assigned for, > because that the guest tab has 'mode' =3D=3D by-instance. > That way each VM will have a new parameter "access" indicating if user has > "full" or "read-only" access to this VM. > > As a user can edit a guest, he/she may need to know which networks > and storage pools are configured, so set network and storage tab 'mode' > to read-only. > > And as user should not perform any operation on host or templates, set > their 'mode' attributes to 'none'. > > Signed-off-by: Aline Manera > --- > config/ui/tabs.xml | 15 +++++++++++++++ > plugins/sample/ui/config/tab-ext.xml | 3 +++ > 2 files changed, 18 insertions(+) > > diff --git a/config/ui/tabs.xml b/config/ui/tabs.xml > index b045521..f79684c 100644 > --- a/config/ui/tabs.xml > +++ b/config/ui/tabs.xml > @@ -1,22 +1,37 @@ > > > > + > + > + > Host > tabs/host.html > > > + > + > + > Guests > tabs/guests.html > > > + > + > + > Templates > tabs/templates.html > > > + > + > + > Storage > tabs/storage.html > > > + > + > + > Network > tabs/network.html > > diff --git a/plugins/sample/ui/config/tab-ext.xml b/plugins/sample/ui/con= fig/tab-ext.xml > index 8e0b3d3..a1fb1c2 100644 > --- a/plugins/sample/ui/config/tab-ext.xml > +++ b/plugins/sample/ui/config/tab-ext.xml > @@ -1,6 +1,9 @@ > > > > + > + > + > SampleTab > plugins/sample/tab.html > --===============5440026607008059130==--