1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: remove invite link flag (#5119)

This commit is contained in:
Jaanus Sellin 2023-10-23 12:11:11 +03:00 committed by GitHub
parent 2aebc8c58e
commit ddcd7f47d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 17 deletions

View File

@ -9,11 +9,7 @@ import { testServerRoute, testServerSetup } from 'utils/testServer';
const server = testServerSetup(); const server = testServerSetup();
const setupApi = () => { const setupApi = () => {
testServerRoute(server, '/api/admin/ui-config', { testServerRoute(server, '/api/admin/ui-config', {});
flags: {
newInviteLink: true,
},
});
}; };
test('Do not show button to non admins', async () => { test('Do not show button to non admins', async () => {
setupApi(); setupApi();

View File

@ -5,7 +5,6 @@ import { focusable } from 'themes/themeStyles';
import AccessContext from 'contexts/AccessContext'; import AccessContext from 'contexts/AccessContext';
import { PersonAdd } from '@mui/icons-material'; import { PersonAdd } from '@mui/icons-material';
import { InviteLinkContent } from '../InviteLinkContent'; import { InviteLinkContent } from '../InviteLinkContent';
import { useUiFlag } from 'hooks/useUiFlag';
const StyledContainer = styled('div')(() => ({ const StyledContainer = styled('div')(() => ({
position: 'relative', position: 'relative',
@ -24,12 +23,11 @@ const StyledIconButton = styled(IconButton)(({ theme }) => ({
const InviteLinkButton = () => { const InviteLinkButton = () => {
const [showInviteLinkContent, setShowInviteLinkContent] = useState(false); const [showInviteLinkContent, setShowInviteLinkContent] = useState(false);
const newInviteLink = useUiFlag('newInviteLink');
const modalId = useId(); const modalId = useId();
const { isAdmin } = useContext(AccessContext); const { isAdmin } = useContext(AccessContext);
if (!isAdmin || !newInviteLink) { if (!isAdmin) {
return null; return null;
} }

View File

@ -66,7 +66,6 @@ export type UiFlags = {
doraMetrics?: boolean; doraMetrics?: boolean;
variantTypeNumber?: boolean; variantTypeNumber?: boolean;
privateProjects?: boolean; privateProjects?: boolean;
newInviteLink?: boolean;
accessOverview?: boolean; accessOverview?: boolean;
datadogJsonTemplate?: boolean; datadogJsonTemplate?: boolean;
dependentFeatures?: boolean; dependentFeatures?: boolean;

View File

@ -107,7 +107,6 @@ exports[`should create default config 1`] = `
}, },
"migrationLock": true, "migrationLock": true,
"multipleRoles": false, "multipleRoles": false,
"newInviteLink": false,
"personalAccessTokensKillSwitch": false, "personalAccessTokensKillSwitch": false,
"playgroundImprovements": false, "playgroundImprovements": false,
"privateProjects": false, "privateProjects": false,
@ -153,7 +152,6 @@ exports[`should create default config 1`] = `
}, },
"migrationLock": true, "migrationLock": true,
"multipleRoles": false, "multipleRoles": false,
"newInviteLink": false,
"personalAccessTokensKillSwitch": false, "personalAccessTokensKillSwitch": false,
"playgroundImprovements": false, "playgroundImprovements": false,
"privateProjects": false, "privateProjects": false,

View File

@ -28,7 +28,6 @@ export type IFlagKey =
| 'doraMetrics' | 'doraMetrics'
| 'variantTypeNumber' | 'variantTypeNumber'
| 'accessOverview' | 'accessOverview'
| 'newInviteLink'
| 'privateProjects' | 'privateProjects'
| 'dependentFeatures' | 'dependentFeatures'
| 'datadogJsonTemplate' | 'datadogJsonTemplate'
@ -142,10 +141,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_PRIVATE_PROJECTS, process.env.UNLEASH_EXPERIMENTAL_PRIVATE_PROJECTS,
false, false,
), ),
newInviteLink: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_NEW_INVITE_LINK,
false,
),
accessOverview: parseEnvVarBoolean( accessOverview: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ACCESS_OVERVIEW, process.env.UNLEASH_EXPERIMENTAL_ACCESS_OVERVIEW,
false, false,

View File

@ -42,7 +42,6 @@ process.nextTick(async () => {
doraMetrics: true, doraMetrics: true,
variantTypeNumber: true, variantTypeNumber: true,
privateProjects: true, privateProjects: true,
newInviteLink: true,
accessOverview: true, accessOverview: true,
datadogJsonTemplate: true, datadogJsonTemplate: true,
dependentFeatures: true, dependentFeatures: true,