[gnome-shell] ScreenShield: hide Removable devices in the lock screen



commit bec48492ab724126fcced119d361b7f07bc89ca7
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Aug 16 22:30:32 2012 +0200

    ScreenShield: hide Removable devices in the lock screen
    
    Showing the removable devices is potentially a security risk (as
    they include network shares). Also, a nautilus launched from there
    can't be used, so it's just a way to overload the system.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681143

 js/ui/autorunManager.js |    1 +
 js/ui/messageTray.js    |    1 +
 js/ui/screenShield.js   |    5 +++--
 3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js
index f39ada3..e93fbfc 100644
--- a/js/ui/autorunManager.js
+++ b/js/ui/autorunManager.js
@@ -262,6 +262,7 @@ const AutorunResidentSource = new Lang.Class({
 
     _init: function() {
         this.parent(_("Removable Devices"), 'media-removable', St.IconType.FULLCOLOR);
+        this.showInLockScreen = false;
 
         this._mounts = [];
 
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index a231c9d..a2729d3 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1037,6 +1037,7 @@ const Source = new Lang.Class({
         this.isTransient = false;
         this.isChat = false;
         this.isMuted = false;
+        this.showInLockScreen = true;
 
         this.notifications = [];
     },
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 74996da..9d7237c 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -159,8 +159,9 @@ const NotificationsBox = new Lang.Class({
     },
 
     _summaryItemAdded: function(tray, item, dontUpdateVisibility) {
-        // Ignore transient sources
-        if (item.source.isTransient)
+        // Ignore transient sources, or sources explicitly marked not to show
+        // in the lock screen
+        if (item.source.isTransient || !item.source.showInLockScreen)
             return;
 
         let obj = {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]