[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.