mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-02-15 05:57:28 +03:00
remote-viewer: Show authentication dialog again if in kiosk mode and connecting to ovirt
Similar to previous commit 5d9e6d2338cbb680fe761b86e6ca433b1234e6e0, now dealing with the case of connecting directly to ovirt:// URIs, which was left behind. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1459808 Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
parent
fb14a8b300
commit
0cd836dd17
@ -738,19 +738,25 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
|
||||
gchar *password = NULL;
|
||||
VirtViewerWindow *window;
|
||||
gboolean success = FALSE;
|
||||
gboolean kiosk = FALSE;
|
||||
|
||||
g_object_get(proxy,
|
||||
"username", &username,
|
||||
NULL);
|
||||
|
||||
g_object_get(G_OBJECT(user_data), "kiosk", &kiosk, NULL);
|
||||
|
||||
if (username == NULL || *username == '\0')
|
||||
username = g_strdup(g_get_user_name());
|
||||
|
||||
window = virt_viewer_app_get_main_window(VIRT_VIEWER_APP(user_data));
|
||||
success = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
|
||||
"oVirt",
|
||||
NULL,
|
||||
&username, &password);
|
||||
do {
|
||||
success = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
|
||||
"oVirt",
|
||||
NULL,
|
||||
&username, &password);
|
||||
} while (kiosk && !success);
|
||||
|
||||
if (success) {
|
||||
g_object_set(G_OBJECT(proxy),
|
||||
"username", username,
|
||||
|
Loading…
x
Reference in New Issue
Block a user