def list_roles_for_user(self, user):
        """
        ADMIN ONLY. Returns a list of roles for the specified user. Each role
        will be a 3-tuple, consisting of (role_id, role_name,
        role_description).
        """
        user_id = utils.get_id(user)
        uri = "users/%s/roles" % user_id
        resp, resp_body = self.method_get(uri)
        if resp.status_code in (401, 403):
            raise exc.AuthorizationFailure("You are not authorized to list "
                    "user roles.")
        roles = resp_body.get("roles")
        return roles
def list_roles_for_user ( self , user ) : user_id = utils . get_id ( user ) uri = "users/%s/roles" % user_id resp , resp_body = self . method_get ( uri ) if resp . status_code in ( 401 , 403 ) : raise exc . AuthorizationFailure ( "You are not authorized to list " "user roles." ) roles = resp_body . get ( "roles" ) return roles
ADMIN ONLY. Returns a list of roles for the specified user. Each role
        will be a 3-tuple, consisting of (role_id, role_name,
        role_description).