WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] CA-34422: add roles to permissions field in session ob

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-34422: add roles to permissions field in session object
From: Marcus Granado <marcus.granado@xxxxxxxxxx>
Date: Fri, 6 Nov 2009 11:00:32 +0000
Delivery-date: Fri, 06 Nov 2009 03:01:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
1 file changed, 3 insertions(+), 1 deletion(-)
ocaml/xapi/xapi_session.ml |    4 +++-


# HG changeset patch
# User Marcus Granado <marcus.granado@xxxxxxxxxx>
# Date 1257446305 0
# Node ID 78df56c36d9d0ab49c3f80f8998d9cc61f445dfe
# Parent  84b88650bef5ac2d8eaa46d583b99c21da844667
CA-34422: add roles to permissions field in session object

Signed-off-by: Marcus Granado <marcus.granado@xxxxxxxxxxxxx>

GUI needs that to be able to efficiently determine a friendly role name
associated with the current session when prompting the user to upgrade
his/her role during a denied access dialog.

diff -r 84b88650bef5 -r 78df56c36d9d ocaml/xapi/xapi_session.ml
--- a/ocaml/xapi/xapi_session.ml        Thu Oct 29 18:20:32 2009 +0000
+++ b/ocaml/xapi/xapi_session.ml        Thu Nov 05 18:38:25 2009 +0000
@@ -70,7 +70,9 @@
        let permission_membership = 
                get_union_of_subsets (*automatically removes duplicated perms*)
                        ~get_subset_fn:(fun role -> 
-                               try Xapi_role.get_permissions_name_label 
~__context ~self:role
+                               try 
+                                       (Xapi_role.get_name_label ~__context 
~self:role)::
+                                       (Xapi_role.get_permissions_name_label 
~__context ~self:role)
                                with _ -> [] (* if the role disappeared, ignore 
it *)
                                )
                        ~set:role_membership

Attachment: xen-api.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-34422: add roles to permissions field in session object, Marcus Granado <=