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
This commit is contained in:
Giovanni Campagna 2012-08-16 22:30:32 +02:00
parent 13a10f8afd
commit bec48492ab
3 changed files with 5 additions and 2 deletions

View File

@ -262,6 +262,7 @@ const AutorunResidentSource = new Lang.Class({
_init: function() { _init: function() {
this.parent(_("Removable Devices"), 'media-removable', St.IconType.FULLCOLOR); this.parent(_("Removable Devices"), 'media-removable', St.IconType.FULLCOLOR);
this.showInLockScreen = false;
this._mounts = []; this._mounts = [];

View File

@ -1037,6 +1037,7 @@ const Source = new Lang.Class({
this.isTransient = false; this.isTransient = false;
this.isChat = false; this.isChat = false;
this.isMuted = false; this.isMuted = false;
this.showInLockScreen = true;
this.notifications = []; this.notifications = [];
}, },

View File

@ -159,8 +159,9 @@ const NotificationsBox = new Lang.Class({
}, },
_summaryItemAdded: function(tray, item, dontUpdateVisibility) { _summaryItemAdded: function(tray, item, dontUpdateVisibility) {
// Ignore transient sources // Ignore transient sources, or sources explicitly marked not to show
if (item.source.isTransient) // in the lock screen
if (item.source.isTransient || !item.source.showInLockScreen)
return; return;
let obj = { let obj = {