From 2680d6cf23c519ab9564103c0b2e54830c88f02ba0d6f274550b619790353dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Tue, 28 Dec 2021 14:54:05 +0000 Subject: [PATCH] Accepting request 942669 from home:xiaoguang_wang:branches:GNOME:Factory - Update gs-fate318433-prevent-same-account-multi-logins.patch: Show message "Multiple logins are not supported" when mixed locally/remotely login(bsc#1190745). OBS-URL: https://build.opensuse.org/request/show/942669 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=493 --- gnome-shell.changes | 7 +++++ ...33-prevent-same-account-multi-logins.patch | 29 ++++++++++--------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/gnome-shell.changes b/gnome-shell.changes index f053eac..456a360 100644 --- a/gnome-shell.changes +++ b/gnome-shell.changes @@ -10,6 +10,13 @@ Fri Dec 17 04:09:17 UTC 2021 - QK ZHU https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/648 (bsc#1190878 glgo#GNOME/gnome-shell#4344). +------------------------------------------------------------------- +Wed Dec 15 01:22:29 UTC 2021 - Xiaoguang Wang + +- Update gs-fate318433-prevent-same-account-multi-logins.patch: + Show message "Multiple logins are not supported" when mixed + locally/remotely login(bsc#1190745). + ------------------------------------------------------------------- Mon Dec 13 16:07:50 UTC 2021 - Bjørn Lie diff --git a/gs-fate318433-prevent-same-account-multi-logins.patch b/gs-fate318433-prevent-same-account-multi-logins.patch index 96cbbca..6d62baa 100644 --- a/gs-fate318433-prevent-same-account-multi-logins.patch +++ b/gs-fate318433-prevent-same-account-multi-logins.patch @@ -1,7 +1,7 @@ -diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js -index 7a4a0d3..e5749d6 100644 ---- a/js/gdm/authPrompt.js -+++ b/js/gdm/authPrompt.js +Index: gnome-shell-41.2/js/gdm/authPrompt.js +=================================================================== +--- gnome-shell-41.2.orig/js/gdm/authPrompt.js ++++ gnome-shell-41.2/js/gdm/authPrompt.js @@ -31,6 +31,8 @@ var AuthPromptStatus = { VERIFICATION_SUCCEEDED: 3, VERIFICATION_CANCELLED: 4, @@ -11,7 +11,7 @@ index 7a4a0d3..e5749d6 100644 }; var BeginRequestType = { -@@ -292,7 +294,12 @@ var AuthPrompt = GObject.registerClass({ +@@ -338,7 +340,13 @@ var AuthPrompt = GObject.registerClass({ } _onVerificationComplete() { @@ -19,16 +19,17 @@ index 7a4a0d3..e5749d6 100644 this.setActorInDefaultButtonWell(null); + + if (this.verificationStatus === AuthPromptStatus.VERIFIED_BUT_FORBIDDEN) { ++ this.cancelButton.reactive = true; + return; + } this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED; this.cancelButton.reactive = false; this.cancelButton.can_focus = false; -diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js -index 3f01ca0..0f5e64c 100644 ---- a/js/gdm/loginDialog.js -+++ b/js/gdm/loginDialog.js -@@ -949,6 +949,8 @@ var LoginDialog = GObject.registerClass({ +Index: gnome-shell-41.2/js/gdm/loginDialog.js +=================================================================== +--- gnome-shell-41.2.orig/js/gdm/loginDialog.js ++++ gnome-shell-41.2/js/gdm/loginDialog.js +@@ -952,6 +952,8 @@ var LoginDialog = GObject.registerClass( this._authPrompt.updateSensitivity(false); let answer = this._authPrompt.getAnswer(); this._user = this._userManager.get_user(answer); @@ -37,7 +38,7 @@ index 3f01ca0..0f5e64c 100644 this._authPrompt.clear(); this._authPrompt.begin({ userName: answer }); this._updateCancelButton(); -@@ -1014,6 +1016,8 @@ var LoginDialog = GObject.registerClass({ +@@ -1017,6 +1019,8 @@ var LoginDialog = GObject.registerClass( let answer = this._authPrompt.getAnswer(); let domain_answer = this._domainMenuButton.getDomainUser(answer); this._user = this._userManager.get_user(domain_answer); @@ -46,11 +47,11 @@ index 3f01ca0..0f5e64c 100644 this._authPrompt.clear(); this._authPrompt.startSpinning(); this._authPrompt.begin({ userName: domain_answer}); -@@ -1040,6 +1044,28 @@ var LoginDialog = GObject.registerClass({ +@@ -1043,6 +1047,28 @@ var LoginDialog = GObject.registerClass( } _onSessionOpened(client, serviceName) { -+ if ( this._userLoginForbidden ) { ++ if (this._user.is_x_logged_in_remotely()) { + this._authPrompt.setMessage( + _('Sorry, you have to log out a previous session first. Multiple logins are not supported.'), + GdmUtil.MessageType.ERROR); @@ -75,7 +76,7 @@ index 3f01ca0..0f5e64c 100644 this._authPrompt.finish(() => this._startSession(serviceName)); } -@@ -1217,6 +1243,7 @@ var LoginDialog = GObject.registerClass({ +@@ -1238,6 +1264,7 @@ var LoginDialog = GObject.registerClass( _onUserListActivated(activatedItem) { this._user = activatedItem.user;