Is there any way to prevent 'User' preference scope?


I’m trying to use theia as a multi-user Web IDE.
But there is a problem that ifone of user changes themes like ‘Toggle Minimap’, all themes of theia browser are also changed which are being used by each us.

So I checked the source code ‘@theia/editor/src/browser/editor-navigation-contribution’.
It show like this

protected async toggleMinimap(): Promise<void> {

        const value: boolean | undefined = this.preferenceService.get('editor.minimap.enabled');

        this.preferenceService.set('editor.minimap.enabled', !value, PreferenceScope.User);


It is prefixed with ‘User’ preference scope.
I tried to change preferece scope from ‘User’ to ‘Workspace’ but no way I could find.

Is there any way to fix preference scope to ‘Workspace’?
Or is there other ways to isolate theme changing per theia workspace?

@mufassa I’m not an expert on what might be required to make the framework work in a multi-tenant way, but I believe the preferences are only one example of what might need to be changed by your application.

For the preferences, since your users share the same filesystem and likely same workspaces, saving preference data under the workspace might not be ideal either. You’ll have user-level preferences in the workspace that are applicable only for the user and would not apply to your other users. One alternative might be to update the storage of preferences to instead use the localstorage to store your preferences rather than on disk to mitigate the issue (but this will likely be a big change on your end).

Please also see the following discussions on multi-tenancy:

Thank you for guiding me to those discussions.

I’ll try to use the localstorage rather than on disk, as you said.