screencast: Re-add lockdown support

Commit 81bb7009ea removed support for the disable-disk-writes
lockdown feature for screencasts, add it back.

https://bugzilla.gnome.org/show_bug.cgi?id=737846
This commit is contained in:
Florian Müllner 2014-10-03 16:40:49 +02:00
parent 4ed4bb330e
commit dd42cfa853

View File

@ -43,6 +43,8 @@ const ScreencastService = new Lang.Class({
this._recorders = new Map();
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
},
@ -103,7 +105,8 @@ const ScreencastService = new Lang.Class({
ScreencastAsync: function(params, invocation) {
let returnValue = [false, ''];
if (!Main.sessionMode.allowScreencast) {
if (!Main.sessionMode.allowScreencast ||
this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
@ -126,7 +129,8 @@ const ScreencastService = new Lang.Class({
ScreencastAreaAsync: function(params, invocation) {
let returnValue = [false, ''];
if (!Main.sessionMode.allowScreencast) {
if (!Main.sessionMode.allowScreencast ||
this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}