Skip to content

Commit

Permalink
feat: Make multiple roles per group/user GA by removing the flag (#5109)
Browse files Browse the repository at this point in the history
To prepare for 5.6 GA, 
I've done a find through both Frontend and Backend here to remove the
usages of the flag. Seems like the flag was only in use in the frontend.
@nunogois can you confirm?
  • Loading branch information
Christopher Kolstad authored Oct 23, 2023
1 parent 69d050a commit 314a08b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,28 +441,11 @@ export const ProjectAccessAssign = ({
Select the role to assign for this project
</StyledInputDescription>
<StyledAutocompleteWrapper>
<ConditionallyRender
condition={Boolean(
uiConfig.flags.multipleRoles,
)}
show={() => (
<MultipleRoleSelect
data-testid={PA_ROLE_ID}
roles={roles}
value={selectedRoles}
setValue={setRoles}
/>
)}
elseShow={() => (
<RoleSelect
data-testid={PA_ROLE_ID}
roles={roles}
value={selectedRoles[0]}
setValue={(role) =>
setRoles(role ? [role] : [])
}
/>
)}
<MultipleRoleSelect
data-testid={PA_ROLE_ID}
roles={roles}
value={selectedRoles}
setValue={setRoles}
/>
</StyledAutocompleteWrapper>
</div>
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 @@ -106,7 +106,6 @@ exports[`should create default config 1`] = `
},
},
"migrationLock": true,
"multipleRoles": false,
"personalAccessTokensKillSwitch": false,
"playgroundImprovements": false,
"privateProjects": false,
Expand Down Expand Up @@ -151,7 +150,6 @@ exports[`should create default config 1`] = `
},
},
"migrationLock": true,
"multipleRoles": 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 @@ -23,7 +23,6 @@ export type IFlagKey =
| 'filterInvalidClientMetrics'
| 'lastSeenByEnvironment'
| 'customRootRolesKillSwitch'
| 'multipleRoles'
| 'featureNamingPattern'
| 'doraMetrics'
| 'variantTypeNumber'
Expand Down Expand Up @@ -117,10 +116,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_CUSTOM_ROOT_ROLES_KILL_SWITCH,
false,
),
multipleRoles: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_MULTIPLE_ROLES,
false,
),
featureNamingPattern: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_FEATURE_NAMING_PATTERN,
false,
Expand Down

0 comments on commit 314a08b

Please sign in to comment.