Dominique Leuenberger
17a72824ad
fix patch2 applying line OBS-URL: https://build.opensuse.org/request/show/423906 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=270
91 lines
4.4 KiB
Diff
91 lines
4.4 KiB
Diff
Index: gnome-shell-3.20.3/js/gdm/loginDialog.js
|
|
===================================================================
|
|
--- gnome-shell-3.20.3.orig/js/gdm/loginDialog.js
|
|
+++ gnome-shell-3.20.3/js/gdm/loginDialog.js
|
|
@@ -900,6 +900,8 @@ const LoginDialog = new Lang.Class({
|
|
this._authPrompt.updateSensitivity(false);
|
|
let answer = this._authPrompt.getAnswer();
|
|
this._user = this._userManager.get_user(answer);
|
|
+ this._userLoginForbidden =
|
|
+ this._user.is_x_logged_in_remotely();
|
|
this._authPrompt.clear();
|
|
this._authPrompt.startSpinning();
|
|
this._authPrompt.begin({ userName: answer });
|
|
@@ -963,6 +965,8 @@ const LoginDialog = new Lang.Class({
|
|
let answer = this._authPrompt.getAnswer();
|
|
let domain_answer = this._domainMenuButton.getDomainUser(answer);
|
|
this._user = this._userManager.get_user(domain_answer);
|
|
+ this._userLoginForbidden =
|
|
+ this._user.is_x_logged_in_remotely();
|
|
this._authPrompt.clear();
|
|
this._authPrompt.startSpinning();
|
|
this._authPrompt.begin({ userName: domain_answer});
|
|
@@ -996,6 +1000,28 @@ const LoginDialog = new Lang.Class({
|
|
},
|
|
|
|
_onSessionOpened: function(client, serviceName) {
|
|
+ if ( this._userLoginForbidden ) {
|
|
+ this._authPrompt.setMessage(
|
|
+ _('Sorry, you have to log out a previous session first. Multiple logins are not supported.'),
|
|
+ GdmUtil.MessageType.ERROR);
|
|
+ // TODO: The following logic relies on the unverified fact that
|
|
+ // `AuthPrompt::_onVerificationComplete` seems to always run after
|
|
+ // current handler. This might root from the interaction between
|
|
+ // greeter and verifier, both are external programs.
|
|
+ this._authPrompt.verificationStatus = AuthPrompt.AuthPromptStatus.VERIFIED_BUT_FORBIDDEN;
|
|
+
|
|
+ // NOTE: Failed Attempts as references
|
|
+ //
|
|
+ // NOTE: reset is too heavy, it skips the error prompt all together
|
|
+ // this._authPrompt.reset();
|
|
+ //
|
|
+ // NOTE: Diconnect at this stage is not working
|
|
+ //
|
|
+ // this._authPrompt._userVerifier.disconnect(this._authPrompt._userVerifierCompleteId);
|
|
+
|
|
+ return;
|
|
+ }
|
|
+
|
|
this._authPrompt.finish(Lang.bind(this, function() {
|
|
this._startSession(serviceName);
|
|
}));
|
|
@@ -1179,6 +1205,7 @@ const LoginDialog = new Lang.Class({
|
|
|
|
_onUserListActivated: function(activatedItem) {
|
|
this._user = activatedItem.user;
|
|
+ this._userLoginForbidden = this._user.is_x_logged_in_remotely();
|
|
|
|
this._updateCancelButton();
|
|
|
|
Index: gnome-shell-3.20.3/js/gdm/authPrompt.js
|
|
===================================================================
|
|
--- gnome-shell-3.20.3.orig/js/gdm/authPrompt.js
|
|
+++ gnome-shell-3.20.3/js/gdm/authPrompt.js
|
|
@@ -30,7 +30,9 @@ const AuthPromptStatus = {
|
|
NOT_VERIFYING: 0,
|
|
VERIFYING: 1,
|
|
VERIFICATION_FAILED: 2,
|
|
- VERIFICATION_SUCCEEDED: 3
|
|
+ VERIFICATION_SUCCEEDED: 3,
|
|
+ // NOTE fate#318433 extra state to track multi-login situation
|
|
+ VERIFIED_BUT_FORBIDDEN: 4
|
|
};
|
|
|
|
const BeginRequestType = {
|
|
@@ -261,9 +263,14 @@ const AuthPrompt = new Lang.Class({
|
|
},
|
|
|
|
_onVerificationComplete: function() {
|
|
+ // NOTE update the spinning icon
|
|
this.setActorInDefaultButtonWell(null);
|
|
+
|
|
+ if (this.verificationStatus === AuthPromptStatus.VERIFIED_BUT_FORBIDDEN) {
|
|
+ return;
|
|
+ }
|
|
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
|
|
- this.cancelButton.reactive = false;
|
|
+ this.cancelButton.reactive = false;
|
|
},
|
|
|
|
_onReset: function() {
|