mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-55403: fix remote marketplace visibility (#25426)
This commit is contained in:
parent
864046f782
commit
22190c13dd
@ -15,7 +15,6 @@ import {
|
|||||||
disablePlugin,
|
disablePlugin,
|
||||||
} from 'mattermost-redux/actions/admin';
|
} from 'mattermost-redux/actions/admin';
|
||||||
import {appsFeatureFlagEnabled} from 'mattermost-redux/selectors/entities/apps';
|
import {appsFeatureFlagEnabled} from 'mattermost-redux/selectors/entities/apps';
|
||||||
import {streamlinedMarketplaceEnabled} from 'mattermost-redux/selectors/entities/preferences';
|
|
||||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||||
|
|
||||||
import PluginManagement from './plugin_management';
|
import PluginManagement from './plugin_management';
|
||||||
@ -25,7 +24,6 @@ function mapStateToProps(state: any) {
|
|||||||
plugins: state.entities.admin.plugins,
|
plugins: state.entities.admin.plugins,
|
||||||
pluginStatuses: state.entities.admin.pluginStatuses,
|
pluginStatuses: state.entities.admin.pluginStatuses,
|
||||||
appsFeatureFlagEnabled: appsFeatureFlagEnabled(state),
|
appsFeatureFlagEnabled: appsFeatureFlagEnabled(state),
|
||||||
streamlinedMarketplaceFlagEnabled: streamlinedMarketplaceEnabled(state),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,6 @@ describe('components/PluginManagement', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
appsFeatureFlagEnabled: false,
|
appsFeatureFlagEnabled: false,
|
||||||
streamlinedMarketplaceFlagEnabled: false,
|
|
||||||
actions: {
|
actions: {
|
||||||
uploadPlugin: jest.fn(),
|
uploadPlugin: jest.fn(),
|
||||||
installPluginFromUrl: jest.fn(),
|
installPluginFromUrl: jest.fn(),
|
||||||
@ -235,7 +234,6 @@ describe('components/PluginManagement', () => {
|
|||||||
pluginStatuses: {},
|
pluginStatuses: {},
|
||||||
plugins: {},
|
plugins: {},
|
||||||
appsFeatureFlagEnabled: false,
|
appsFeatureFlagEnabled: false,
|
||||||
streamlinedMarketplaceFlagEnabled: false,
|
|
||||||
actions: {
|
actions: {
|
||||||
uploadPlugin: jest.fn(),
|
uploadPlugin: jest.fn(),
|
||||||
installPluginFromUrl: jest.fn(),
|
installPluginFromUrl: jest.fn(),
|
||||||
@ -326,7 +324,6 @@ describe('components/PluginManagement', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
appsFeatureFlagEnabled: false,
|
appsFeatureFlagEnabled: false,
|
||||||
streamlinedMarketplaceFlagEnabled: false,
|
|
||||||
actions: {
|
actions: {
|
||||||
uploadPlugin: jest.fn(),
|
uploadPlugin: jest.fn(),
|
||||||
installPluginFromUrl: jest.fn(),
|
installPluginFromUrl: jest.fn(),
|
||||||
@ -384,7 +381,6 @@ describe('components/PluginManagement', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
appsFeatureFlagEnabled: false,
|
appsFeatureFlagEnabled: false,
|
||||||
streamlinedMarketplaceFlagEnabled: false,
|
|
||||||
actions: {
|
actions: {
|
||||||
uploadPlugin: jest.fn(),
|
uploadPlugin: jest.fn(),
|
||||||
installPluginFromUrl: jest.fn(),
|
installPluginFromUrl: jest.fn(),
|
||||||
@ -502,7 +498,6 @@ describe('components/PluginManagement', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
appsFeatureFlagEnabled: false,
|
appsFeatureFlagEnabled: false,
|
||||||
streamlinedMarketplaceFlagEnabled: false,
|
|
||||||
actions: {
|
actions: {
|
||||||
uploadPlugin: jest.fn(),
|
uploadPlugin: jest.fn(),
|
||||||
installPluginFromUrl: jest.fn(),
|
installPluginFromUrl: jest.fn(),
|
||||||
|
@ -420,7 +420,6 @@ type Props = BaseProps & {
|
|||||||
pluginStatuses: Record<string, PluginStatus>;
|
pluginStatuses: Record<string, PluginStatus>;
|
||||||
plugins: any;
|
plugins: any;
|
||||||
appsFeatureFlagEnabled: boolean;
|
appsFeatureFlagEnabled: boolean;
|
||||||
streamlinedMarketplaceFlagEnabled: boolean;
|
|
||||||
actions: {
|
actions: {
|
||||||
uploadPlugin: (fileData: File, force: boolean) => any;
|
uploadPlugin: (fileData: File, force: boolean) => any;
|
||||||
removePlugin: (pluginId: string) => any;
|
removePlugin: (pluginId: string) => any;
|
||||||
@ -1220,8 +1219,6 @@ export default class PluginManagement extends AdminSettings<Props, State> {
|
|||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
setByEnv={this.isSetByEnv('PluginSettings.EnableMarketplace')}
|
setByEnv={this.isSetByEnv('PluginSettings.EnableMarketplace')}
|
||||||
/>
|
/>
|
||||||
{!this.props.streamlinedMarketplaceFlagEnabled && (
|
|
||||||
<>
|
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
id='enableRemoteMarketplace'
|
id='enableRemoteMarketplace'
|
||||||
label={
|
label={
|
||||||
@ -1257,8 +1254,6 @@ export default class PluginManagement extends AdminSettings<Props, State> {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{pluginsContainer}
|
{pluginsContainer}
|
||||||
</SettingsGroup>
|
</SettingsGroup>
|
||||||
{overwriteUploadPluginModal}
|
{overwriteUploadPluginModal}
|
||||||
|
Loading…
Reference in New Issue
Block a user