1
0
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:

![image](https://github.com/user-attachments/assets/17d35ab4-cc2c-4f90-9bee-7fdc3550e1ec)

LLM: Gemini 2.5 Pro (preview)

@kwasniew do we still need this kill-switch?
This commit is contained in:
Ivar Conradi Østhus 2025-06-20 13:18:50 +02:00 committed by GitHub
parent f9ca769179
commit 2ecb4b0a4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 43 deletions

View File

@ -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}

View File

@ -59,7 +59,6 @@ export type UiFlags = {
personalAccessTokensKillSwitch?: boolean;
demo?: boolean;
googleAuthEnabled?: boolean;
disableBulkToggle?: boolean;
advancedPlayground?: boolean;
strategyVariant?: boolean;
doraMetrics?: boolean;

View File

@ -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,

View File

@ -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,