# HG changeset patch # User Marcus Granado # Date 1257446305 0 # Node ID 78df56c36d9d0ab49c3f80f8998d9cc61f445dfe # Parent 84b88650bef5ac2d8eaa46d583b99c21da844667 CA-34422: add roles to permissions field in session object Signed-off-by: Marcus Granado 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