screenShield: Show detailed notification data if notifications hint it
Allow notifications to set a x-gnome-privacy-scope hint, with values in ['system', 'user']. If all the notifications in a particular source hint that their privacy scope is ‘system’, don’t hide the notification details on the lock screen. This is aimed at fixing the particular case of power notifications: they contain information which is not private to the user (it relates to the system: battery state or AC state, which is obvious to anyone who can see the machine), so hiding the details of a power management notification when the screen is locked is pointless. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://gitlab.gnome.org/GNOME/gnome-shell/issues/726
This commit is contained in:

committed by
Florian Müllner

parent
37e0a73c8f
commit
e92477a752
@ -352,6 +352,10 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
|
||||
// of the 'transient' hint with hints['transient'] rather than hints.transient
|
||||
notification.setTransient(!!hints['transient']);
|
||||
|
||||
let privacyScope = (hints['x-gnome-privacy-scope'] || 'user');
|
||||
notification.setPrivacyScope(privacyScope == 'system' ? MessageTray.PrivacyScope.SYSTEM
|
||||
: MessageTray.PrivacyScope.USER);
|
||||
|
||||
let sourceGIcon = source.useNotificationIcon ? gicon : null;
|
||||
source.processNotification(notification, sourceGIcon);
|
||||
}
|
||||
|
Reference in New Issue
Block a user