Bug 376601 - "Leave" overlay does not respect Polkit rule
Summary: "Leave" overlay does not respect Polkit rule
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Theme packages (show other bugs)
Version: 5.9.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-18 03:48 UTC by patrick.rifici
Modified: 2017-02-23 11:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.7


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description patrick.rifici 2017-02-18 03:48:42 UTC
When a custom Polkit rule is set to disable sleep and hibernation the buttons for both sleep and hibernate are removed from the Application Launcher's "Leave" menu. However, upon selecting an option from the "Leave" menu the splash screen that appears still has a "Suspend" button (although it doesn't function). I would recommend that the splash screen respect the same Polkit rule the Application Launcher does for consistency.

System Information:
OS: Arch Linux x86_64
KDE Plasma Version: 5.9.2
KDE Frameworks Version: 5.31.0
Qt Version: 5.8.0

Polkit rule contents (/etc/polkit-1/rules.d/10-disable-suspend.rules):

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.suspend" ||
        action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
        action.id == "org.freedesktop.login1.hibernate" ||
        action.id == "org.freedesktop.login1.hibernate-multiple-sessions")
    {
        return polkit.Result.NO;
    }
});
Comment 1 Kai Uwe Broulik 2017-02-18 14:03:33 UTC
Does it at least ask for permission to suspend when or does it here allow you to actually bypass that restriction?
Comment 2 Kai Uwe Broulik 2017-02-18 14:04:15 UTC
Nevermind. Reading is difficult :D
Comment 3 Kai Uwe Broulik 2017-02-23 11:30:59 UTC
Git commit 8bc32846a5a41fa67c106045c43bb8c4af7e7e6f by Kai Uwe Broulik.
Committed on 23/02/2017 at 11:30.
Pushed by broulik into branch 'Plasma/5.8'.

[Logout Screen] Show suspend button only if supported
FIXED-IN: 5.8.7

M  +1    -0    lookandfeel/contents/logout/Logout.qml

https://commits.kde.org/plasma-workspace/8bc32846a5a41fa67c106045c43bb8c4af7e7e6f