From 5445b705f1c7accf1e7a949b614faade0fa5b1a1 Mon Sep 17 00:00:00 2001 From: Alessandro Bono Date: Mon, 19 Aug 2024 10:42:08 +0200 Subject: [PATCH] authPrompt: Allow to set a custom ShellUserVerifer Move ShellUserVerifier creation to its own function so that extensions can easily override it. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7828 Part-of: --- js/gdm/authPrompt.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 58b1c3cbd..0e0d62ab0 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -74,7 +74,7 @@ export const AuthPrompt = GObject.registerClass({ else if (this._mode === AuthPromptMode.UNLOCK_OR_LOG_IN) reauthenticationOnly = false; - this._userVerifier = new GdmUtil.ShellUserVerifier(this._gdmClient, {reauthenticationOnly}); + this._userVerifier = this._createUserVerifier(this._gdmClient, {reauthenticationOnly}); this._userVerifier.connect('ask-question', this._onAskQuestion.bind(this)); this._userVerifier.connect('show-message', this._onShowMessage.bind(this)); @@ -124,6 +124,10 @@ export const AuthPrompt = GObject.registerClass({ this.add_child(this._message); } + _createUserVerifier(gdmClient, params) { + return new GdmUtil.ShellUserVerifier(gdmClient, params); + } + _onDestroy() { this._inactiveEntry.destroy(); this._inactiveEntry = null;