From bec48492ab724126fcced119d361b7f07bc89ca7 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 16 Aug 2012 22:30:32 +0200 Subject: [PATCH] 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 f39ada3eb..e93fbfc9a 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 a231c9d92..a2729d3ee 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 74996da87..9d7237c8f 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 = {