Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove invite link flag #5119

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import { testServerRoute, testServerSetup } from 'utils/testServer';
const server = testServerSetup();

const setupApi = () => {
testServerRoute(server, '/api/admin/ui-config', {
flags: {
newInviteLink: true,
},
});
testServerRoute(server, '/api/admin/ui-config', {});
};
test('Do not show button to non admins', async () => {
setupApi();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { focusable } from 'themes/themeStyles';
import AccessContext from 'contexts/AccessContext';
import { PersonAdd } from '@mui/icons-material';
import { InviteLinkContent } from '../InviteLinkContent';
import { useUiFlag } from 'hooks/useUiFlag';

const StyledContainer = styled('div')(() => ({
position: 'relative',
Expand All @@ -24,12 +23,11 @@ const StyledIconButton = styled(IconButton)(({ theme }) => ({

const InviteLinkButton = () => {
const [showInviteLinkContent, setShowInviteLinkContent] = useState(false);
const newInviteLink = useUiFlag('newInviteLink');
const modalId = useId();

const { isAdmin } = useContext(AccessContext);

if (!isAdmin || !newInviteLink) {
if (!isAdmin) {
return null;
}

Expand Down
1 change: 0 additions & 1 deletion frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export type UiFlags = {
doraMetrics?: boolean;
variantTypeNumber?: boolean;
privateProjects?: boolean;
newInviteLink?: boolean;
accessOverview?: boolean;
datadogJsonTemplate?: boolean;
dependentFeatures?: boolean;
Expand Down
2 changes: 0 additions & 2 deletions src/lib/__snapshots__/create-config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ exports[`should create default config 1`] = `
},
"migrationLock": true,
"multipleRoles": false,
"newInviteLink": false,
"personalAccessTokensKillSwitch": false,
"playgroundImprovements": false,
"privateProjects": false,
Expand Down Expand Up @@ -153,7 +152,6 @@ exports[`should create default config 1`] = `
},
"migrationLock": true,
"multipleRoles": false,
"newInviteLink": false,
"personalAccessTokensKillSwitch": false,
"playgroundImprovements": false,
"privateProjects": false,
Expand Down
5 changes: 0 additions & 5 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export type IFlagKey =
| 'doraMetrics'
| 'variantTypeNumber'
| 'accessOverview'
| 'newInviteLink'
| 'privateProjects'
| 'dependentFeatures'
| 'datadogJsonTemplate'
Expand Down Expand Up @@ -142,10 +141,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_PRIVATE_PROJECTS,
false,
),
newInviteLink: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_NEW_INVITE_LINK,
false,
),
accessOverview: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ACCESS_OVERVIEW,
false,
Expand Down
1 change: 0 additions & 1 deletion src/server-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ process.nextTick(async () => {
doraMetrics: true,
variantTypeNumber: true,
privateProjects: true,
newInviteLink: true,
accessOverview: true,
datadogJsonTemplate: true,
dependentFeatures: true,
Expand Down
Loading