diff --git a/data/dbus-interfaces/org.gnome.Shell.Extensions.xml b/data/dbus-interfaces/org.gnome.Shell.Extensions.xml
index 61c898e3d..eb7be8f1a 100644
--- a/data/dbus-interfaces/org.gnome.Shell.Extensions.xml
+++ b/data/dbus-interfaces/org.gnome.Shell.Extensions.xml
@@ -234,5 +234,11 @@
-->
+
+
+
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 05b7aca60..691019b42 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -255,6 +255,17 @@ var GnomeShellExtensions = class {
constructor() {
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellExtensionsIface, this);
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell');
+
+ this._userExtensionsEnabled = this.UserExtensionsEnabled;
+ global.settings.connect('changed::disable-user-extensions', () => {
+ if (this._userExtensionsEnabled === this.UserExtensionsEnabled)
+ return;
+
+ this._userExtensionsEnabled = this.UserExtensionsEnabled;
+ this._dbusImpl.emit_property_changed('UserExtensionsEnabled',
+ new GLib.Variant('b', this._userExtensionsEnabled));
+ });
+
Main.extensionManager.connect('extension-state-changed',
this._extensionStateChanged.bind(this));
}
@@ -325,6 +336,14 @@ var GnomeShellExtensions = class {
return Config.PACKAGE_VERSION;
}
+ get UserExtensionsEnabled() {
+ return !global.settings.get_boolean('disable-user-extensions');
+ }
+
+ set UserExtensionsEnabled(enable) {
+ global.settings.set_boolean('disable-user-extensions', !enable);
+ }
+
_extensionStateChanged(_, newState) {
let state = ExtensionUtils.serializeExtension(newState);
this._dbusImpl.emit_signal('ExtensionStateChanged',