extensionSystem: Support locking down extension installation
Currently extensions can only be locked down completely by restricting the `enabled-extensions` key via dconf. This is too restrictive for environments that want to allow users to customize their system with extensions, while still limiting the set of possible extensions. To fill that gap, add a new `allow-extension-installation` setting, which restricts extensions to system extensions when disabled. As the setting is mainly intended for locking down by system administrators, there is no attempt to load/unload extensions on settings changes. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3180>
This commit is contained in:

committed by
Marge Bot

parent
8f2ab674fc
commit
c170d6c956
@ -32,6 +32,13 @@ let _httpSession;
|
||||
* @returns {void}
|
||||
*/
|
||||
export async function installExtension(uuid, invocation) {
|
||||
if (!global.settings.get_boolean('allow-extension-installation')) {
|
||||
invocation.return_error_literal(
|
||||
ExtensionErrors, ExtensionError.NOT_ALLOWED,
|
||||
'Extension installation is not allowed');
|
||||
return;
|
||||
}
|
||||
|
||||
const params = {
|
||||
uuid,
|
||||
shell_version: Config.PACKAGE_VERSION,
|
||||
|
Reference in New Issue
Block a user