After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748338 - Missing check in misc/loginManager.js for CanSuspend
Missing check in misc/loginManager.js for CanSuspend
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-22 22:17 UTC by Mario Sánchez Prada
Modified: 2015-04-23 08:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch proposal (1.33 KB, patch)
2015-04-22 22:19 UTC, Mario Sánchez Prada
committed Details | Review

Description Mario Sánchez Prada 2015-04-22 22:17:31 UTC
According to systemd logind's documentation, the CanSuspend() method "returns 'na' in case "the operation is not available because hardware, kernel or drivers do not support it", while "'no' is returned if the operation is available but the user is not allowed to execute it".
    
    http://www.freedesktop.org/wiki/Software/systemd/logind

Thus, we need to return true here when the reply for the CanSuspend method is neither 'no' nor 'na', or we would providing false positives in cases where suspension is simply unsupported.

A simple patch is on the way...
Comment 1 Mario Sánchez Prada 2015-04-22 22:19:11 UTC
Created attachment 302187 [details] [review]
Patch proposal

Here comes a simple patch, tested locally and works fine.

Please review, thanks!
Comment 2 Florian Müllner 2015-04-22 23:21:23 UTC
Review of attachment 302187 [details] [review]:

OK
Comment 3 Mario Sánchez Prada 2015-04-23 08:43:56 UTC
Review of attachment 302187 [details] [review]:

Thanks, committed