Create User-Level Extension Marketplace settings
MR: Add Extensions Marketplace in Web IDE (!151352 - merged)
Description
Based on Create Instance-Level and Root-Group-Level Exte... (#451871). From this note:
Allow Extension Marketplace: which is a flag for whether the Web IDE and Remote Development Workspace should initialize the Extension Marketplace for the current user. If the instance setting Require user opt-in is true, then we'll show a warning to the user with the legal disclaimer when the user enables this flag:
Implementation notes
-
We should have something in
lib/gitlab/web_ide
that encapsulates the logic forextension_marketplace_instance_enabled?
. If this is false, we don't need to show the setting in user profile. If this is true, we'll show it. -
We should add something like
extension_marketplace_for_user(user)
which returns the user specific extension marketplace setting that'll be used by the IDE.- If it is not instance enabled, this should be
{ enabled: false, reason: 'instance' }
- If it is instance enabled but not user enabled, this should be
{ enabled: false, reason: 'user', profileUrl: '...' }
- If if is enabled all around, this should be
{ enabled: true, url: '...' }
- We'll pass this to the Web IDE under a new
extensionMarketplace
param.
- If it is not instance enabled, this should be
-
Values for
ExtensionGalleryDisabledReason
enum:- "NO_USER"
- "NO_OPT_IN"
- "INSTANCE_DISABLED"
-
Relevant Feature Flags:
- (exists)
allow_extensions_marketplace_in_workspace
allow_extensions_marketplace_in_client_only
- (exists)
-
Proposal for
RemoteDevelopment::Settings
get_all_settings({ user:, extension_marketplace_feature_flag_enabled })