mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-27 01:19:00 +02:00
Chore/remove flag disable bulk toggle (#10183)
Prompt used:  LLM: Gemini 2.5 Pro (preview) @kwasniew do we still need this kill-switch?
This commit is contained in:
parent
f9ca769179
commit
2ecb4b0a4f
@ -9,7 +9,6 @@ import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||
import { BulkDisableDialog } from 'component/feature/FeatureToggleList/BulkDisableDialog';
|
||||
import { BulkEnableDialog } from 'component/feature/FeatureToggleList/BulkEnableDialog';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
|
||||
interface IProjectFeaturesBatchActionsProps {
|
||||
selectedIds: string[];
|
||||
@ -72,32 +71,20 @@ export const ProjectFeaturesBatchActions: FC<
|
||||
|
||||
return (
|
||||
<>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(uiConfig?.flags?.disableBulkToggle)}
|
||||
show={null}
|
||||
elseShow={
|
||||
<Button
|
||||
variant='outlined'
|
||||
size='small'
|
||||
onClick={() => setShowBulkEnableDialog(true)}
|
||||
>
|
||||
Enable
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(uiConfig?.flags?.disableBulkToggle)}
|
||||
show={null}
|
||||
elseShow={
|
||||
<Button
|
||||
variant='outlined'
|
||||
size='small'
|
||||
onClick={() => setShowBulkDisableDialog(true)}
|
||||
>
|
||||
Disable
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
variant='outlined'
|
||||
size='small'
|
||||
onClick={() => setShowBulkEnableDialog(true)}
|
||||
>
|
||||
Enable
|
||||
</Button>
|
||||
<Button
|
||||
variant='outlined'
|
||||
size='small'
|
||||
onClick={() => setShowBulkDisableDialog(true)}
|
||||
>
|
||||
Disable
|
||||
</Button>
|
||||
<ArchiveButton
|
||||
projectId={projectId}
|
||||
featureIds={selectedIds}
|
||||
|
@ -59,7 +59,6 @@ export type UiFlags = {
|
||||
personalAccessTokensKillSwitch?: boolean;
|
||||
demo?: boolean;
|
||||
googleAuthEnabled?: boolean;
|
||||
disableBulkToggle?: boolean;
|
||||
advancedPlayground?: boolean;
|
||||
strategyVariant?: boolean;
|
||||
doraMetrics?: boolean;
|
||||
|
@ -918,11 +918,6 @@ export default class ProjectFeaturesController extends Controller {
|
||||
const { shouldActivateDisabledStrategies } = req.query;
|
||||
const { features } = req.body;
|
||||
|
||||
if (this.flagResolver.isEnabled('disableBulkToggle')) {
|
||||
res.status(403).end();
|
||||
return;
|
||||
}
|
||||
|
||||
await this.transactionalFeatureToggleService.transactional((service) =>
|
||||
service.bulkUpdateEnabled(
|
||||
projectId,
|
||||
@ -950,11 +945,6 @@ export default class ProjectFeaturesController extends Controller {
|
||||
const { shouldActivateDisabledStrategies } = req.query;
|
||||
const { features } = req.body;
|
||||
|
||||
if (this.flagResolver.isEnabled('disableBulkToggle')) {
|
||||
res.status(403).end();
|
||||
return;
|
||||
}
|
||||
|
||||
await this.transactionalFeatureToggleService.transactional((service) =>
|
||||
service.bulkUpdateEnabled(
|
||||
projectId,
|
||||
|
@ -17,7 +17,6 @@ export type IFlagKey =
|
||||
| 'migrationLock'
|
||||
| 'demo'
|
||||
| 'googleAuthEnabled'
|
||||
| 'disableBulkToggle'
|
||||
| 'advancedPlayground'
|
||||
| 'filterInvalidClientMetrics'
|
||||
| 'disableMetrics'
|
||||
@ -105,10 +104,6 @@ const flags: IFlags = {
|
||||
process.env.GOOGLE_AUTH_ENABLED,
|
||||
false,
|
||||
),
|
||||
disableBulkToggle: parseEnvVarBoolean(
|
||||
process.env.DISABLE_BULK_TOGGLE,
|
||||
false,
|
||||
),
|
||||
filterInvalidClientMetrics: parseEnvVarBoolean(
|
||||
process.env.FILTER_INVALID_CLIENT_METRICS,
|
||||
false,
|
||||
|
Loading…
Reference in New Issue
Block a user