Show 'Log out' in more situations
When the current user is a remote account, or a we are logged in as root, we should always show 'Log out'. https://bugzilla.gnome.org/show_bug.cgi?id=686736
This commit is contained in:
parent
04da29c939
commit
56909d0646
@ -616,10 +616,12 @@ const UserMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
_updateLogout: function() {
|
_updateLogout: function() {
|
||||||
let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
|
let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
|
||||||
|
let systemAccount = this._user.system_account;
|
||||||
|
let localAccount = this._user.local_account;
|
||||||
let multiUser = this._userManager.has_multiple_users;
|
let multiUser = this._userManager.has_multiple_users;
|
||||||
let multiSession = Gdm.get_session_ids().length > 1;
|
let multiSession = Gdm.get_session_ids().length > 1;
|
||||||
|
|
||||||
this._logoutItem.actor.visible = allowLogout && (multiUser || multiSession);
|
this._logoutItem.actor.visible = allowLogout && (multiUser || multiSession || systemAccount || !localAccount);
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateLockScreen: function() {
|
_updateLockScreen: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user