diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js index 1515fc9e3..4a7859e46 100644 --- a/js/misc/loginManager.js +++ b/js/misc/loginManager.js @@ -106,6 +106,10 @@ class LoginManagerSystemd extends Signals.EventEmitter { this._sessionRemoved.bind(this)); } + getCurrentUserProxy() { + return this._userProxy; + } + async getCurrentSessionProxy() { if (this._currentSession) return this._currentSession; @@ -220,6 +224,12 @@ class LoginManagerSystemd extends Signals.EventEmitter { } class LoginManagerDummy extends Signals.EventEmitter { + getCurrentUserProxy() { + // we could return a DummyUser object that fakes whatever callers + // expect, but just never settling the promise should be safer + return new Promise(() => {}); + } + getCurrentSessionProxy() { // we could return a DummySession object that fakes whatever callers // expect (at the time of writing: connect() and connectSignal()