Blame SOURCES/0003-DOWNSTREAM-remote-viewer-Set-admin-privileges-when-c.patch

2a0fe3
From f06747e69cdade6c2774462a208535de890978c1 Mon Sep 17 00:00:00 2001
394f7b
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
394f7b
Date: Mon, 26 Aug 2019 10:18:20 -0300
2a0fe3
Subject: [PATCH virt-viewer] [DOWNSTREAM] remote-viewer: Set admin privileges
2a0fe3
 when connecting to ovirt
394f7b
394f7b
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
394f7b
---
394f7b
 src/remote-viewer.c | 2 ++
394f7b
 1 file changed, 2 insertions(+)
394f7b
394f7b
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
2a0fe3
index 2450096..9e63bfb 100644
394f7b
--- a/src/remote-viewer.c
394f7b
+++ b/src/remote-viewer.c
2a0fe3
@@ -340,6 +340,7 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
394f7b
         g_object_set(G_OBJECT(proxy),
394f7b
                      "username", username,
394f7b
                      "password", password,
394f7b
+                     "admin", g_str_has_prefix(username, "admin"),
394f7b
                      NULL);
394f7b
     } else {
2a0fe3
         rest_proxy_auth_cancel(auth);
2a0fe3
@@ -433,6 +434,7 @@ create_ovirt_session(VirtViewerApp *app, const char *uri, GError **err)
394f7b
     proxy = ovirt_proxy_new(rest_uri);
394f7b
     g_object_set(proxy,
394f7b
                  "username", username,
394f7b
+                 "admin", g_str_has_prefix(username, "admin"),
394f7b
                  NULL);
394f7b
     ovirt_set_proxy_options(proxy);
394f7b
     g_signal_connect(G_OBJECT(proxy), "authenticate",
394f7b
-- 
2a0fe3
2.26.2
394f7b