We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2018-11-18 01:04:24 +0200

Top menu shouldn't allow to organize when device is locked

Currently, when device is locked, it's not possible to use connectivity switches from the lock screen top menu; but it is possible to organize (re-order/remove) top menu items. It shouldn't be either.

Top menu shouldn't allow to organize when device is locked

Currently, when device is locked, it's not possible to use connectivity switches from the lock screen top menu; but it is possible to organize (re-order/remove) top menu items. It shouldn't be either.

Top menu shouldn't allow to organize when device is locked

Currently, when device is locked, it's not possible to use connectivity switches from the lock screen top menu; but it is possible to organize (re-order/remove) top menu items. It shouldn't be either.

Edit: I'm not speaking about toggles/switches, just mentioned them as an example. I'm talking about organize. It shouldn't be enabled when device is locked, or at least there should be an option. The current behavior (always enabled even on device lock seems a security flaw to me.) It's easy with few changes in:

/usr/share/lipstick-jolla-home-qt5/topmenu/TopMenu.qml

@@ -5,6 +5,7 @@
 import com.jolla.lipstick 0.1
 import org.freedesktop.contextkit 1.0
 import org.nemomobile.configuration 1.0
+import org.nemomobile.devicelock 1.0

 SilicaFlickable {
     id: topMenu
@@ -311,6 +312,7 @@
                                     MenuItem {
                                         //% "Organize"
                                         text: qsTrId("lipstick_jolla_home-me-topmenu_organize")
+                                        enabled: Desktop.deviceLockState == DeviceLock.Unlocked
                                         onClicked: Lipstick.compositor.topMenuLayer.housekeeping = !Lipstick.compositor.topMenuLayer.housekeeping
                                     }

Top menu shouldn't allow to organize when device is locked

Currently, when device is locked, it's not possible to use connectivity switches from the lock screen top menu; but it is possible to organize (re-order/remove) top menu items. It shouldn't be either.

Edit: I'm not speaking about toggles/switches, just mentioned them as an example. I'm talking about organize. It shouldn't be enabled when device is locked, or at least there should be an option. The current behavior (always enabled even on device lock seems a security flaw to me.) It's easy with few changes in:

/usr/share/lipstick-jolla-home-qt5/topmenu/TopMenu.qml

@@ -5,6 +5,7 @@
 import com.jolla.lipstick 0.1
 import org.freedesktop.contextkit 1.0
 import org.nemomobile.configuration 1.0
+import org.nemomobile.devicelock 1.0

 SilicaFlickable {
     id: topMenu
@@ -311,6 +312,7 @@
                                     MenuItem {
                                         //% "Organize"
                                         text: qsTrId("lipstick_jolla_home-me-topmenu_organize")
+                                        enabled: Desktop.deviceLockState == DeviceLock.Unlocked
                                         onClicked: Lipstick.compositor.topMenuLayer.housekeeping = !Lipstick.compositor.topMenuLayer.housekeeping
                                     }

Source: this patch of mine.