[Differential] [Commented On] D3231: [Lock Screen] Show "Switch User" button only if allowed
davidedmundson (David Edmundson)
noreply at phabricator.kde.org
Wed Nov 2 16:45:50 UTC 2016
davidedmundson added a comment.
If switching is disabled, we still want to hide the button.
I think we need:
(count > 0 || canStartNew) && canSwitch
---
> bool SessionsModel::canSwitchUser() const
{
return const_cast<SessionsModel *>(this)->m_displayManager.isSwitchable() && KAuthorized::authorizeAction(QLatin1String("switch_user"));
}
bool SessionsModel::canStartNewSession() const
{
return const_cast<SessionsModel *>(this)->m_displayManager.numReserve() > 0 && KAuthorized::authorizeAction(QLatin1String("start_new_session"));
}
REPOSITORY
rPLASMAWORKSPACE Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D3231
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: broulik, #plasma, subdiff
Cc: davidedmundson, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161102/636ad365/attachment.html>
More information about the Plasma-devel
mailing list