mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
chore: service accounts GA (#3059)
## About the changes This PR prepares the GA of service accounts: OpenAPI tags, documentation and flag removal Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item: #2942 --------- Co-authored-by: Nuno Góis <github@nunogois.com>
This commit is contained in:
parent
1ca918295a
commit
354b5b2976
@ -12,7 +12,7 @@ const StyledPaper = styled(Paper)(({ theme }) => ({
|
||||
}));
|
||||
|
||||
function AdminMenu() {
|
||||
const { uiConfig } = useUiConfig();
|
||||
const { uiConfig, isEnterprise } = useUiConfig();
|
||||
const { pathname } = useLocation();
|
||||
const { isBilling } = useInstanceStatus();
|
||||
const { flags } = uiConfig;
|
||||
@ -35,7 +35,7 @@ function AdminMenu() {
|
||||
</CenteredNavLink>
|
||||
}
|
||||
/>
|
||||
{flags.serviceAccounts && (
|
||||
{isEnterprise() && (
|
||||
<Tab
|
||||
value="service-accounts"
|
||||
label={
|
||||
|
@ -468,8 +468,7 @@ export const adminMenuRoutes: INavigationMenuItem[] = [
|
||||
{
|
||||
path: '/admin/service-accounts',
|
||||
title: 'Service accounts',
|
||||
menu: { adminSettings: true },
|
||||
flag: 'serviceAccounts',
|
||||
menu: { adminSettings: true, isEnterprise: true },
|
||||
},
|
||||
{
|
||||
path: '/admin/network/*',
|
||||
|
@ -12,10 +12,10 @@ export interface IUseServiceAccountTokensOutput {
|
||||
}
|
||||
|
||||
export const useServiceAccountTokens = (id: number) => {
|
||||
const { uiConfig, isEnterprise } = useUiConfig();
|
||||
const { isEnterprise } = useUiConfig();
|
||||
|
||||
const { data, error, mutate } = useConditionalSWR(
|
||||
Boolean(uiConfig.flags.serviceAccounts) && isEnterprise(),
|
||||
isEnterprise(),
|
||||
{ tokens: [] },
|
||||
formatApiPath(`api/admin/service-account/${id}/token`),
|
||||
fetcher
|
||||
|
@ -10,7 +10,7 @@ export const useServiceAccounts = () => {
|
||||
const { uiConfig, isEnterprise } = useUiConfig();
|
||||
|
||||
const { data, error, mutate } = useConditionalSWR(
|
||||
Boolean(uiConfig.flags.serviceAccounts) && isEnterprise(),
|
||||
isEnterprise(),
|
||||
{ serviceAccounts: [], rootRoles: [] },
|
||||
formatApiPath(`api/admin/service-account`),
|
||||
fetcher
|
||||
|
@ -43,7 +43,6 @@ export interface IFlags {
|
||||
maintenance?: boolean;
|
||||
maintenanceMode?: boolean;
|
||||
messageBanner?: boolean;
|
||||
serviceAccounts?: boolean;
|
||||
featuresExportImport?: boolean;
|
||||
newProjectOverview?: boolean;
|
||||
caseInsensitiveInOperators?: boolean;
|
||||
|
@ -82,7 +82,6 @@ exports[`should create default config 1`] = `
|
||||
"projectStatusApi": false,
|
||||
"proxyReturnAllToggles": false,
|
||||
"responseTimeWithAppName": false,
|
||||
"serviceAccounts": false,
|
||||
"showProjectApiAccess": false,
|
||||
"variantsPerEnvironment": false,
|
||||
},
|
||||
@ -104,7 +103,6 @@ exports[`should create default config 1`] = `
|
||||
"projectStatusApi": false,
|
||||
"proxyReturnAllToggles": false,
|
||||
"responseTimeWithAppName": false,
|
||||
"serviceAccounts": false,
|
||||
"showProjectApiAccess": false,
|
||||
"variantsPerEnvironment": false,
|
||||
},
|
||||
|
@ -18,6 +18,11 @@ const OPENAPI_TAGS = [
|
||||
description:
|
||||
'Create, update, and delete [Personal access tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens).',
|
||||
},
|
||||
{
|
||||
name: 'Service Accounts',
|
||||
description:
|
||||
'Endpoints for managing [Service Accounts](https://docs.getunleash.io/reference/service-accounts), which enable programmatic access to the Unleash API.',
|
||||
},
|
||||
{
|
||||
name: 'Archive',
|
||||
description:
|
||||
|
@ -50,10 +50,6 @@ const flags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_MESSAGE_BANNER,
|
||||
false,
|
||||
),
|
||||
serviceAccounts: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_SERVICE_ACCOUNTS,
|
||||
false,
|
||||
),
|
||||
featuresExportImport: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_FEATURES_EXPORT_IMPORT,
|
||||
false,
|
||||
|
@ -8423,6 +8423,10 @@ If the provided project does not exist, the list of events will be empty.",
|
||||
"description": "Create, update, delete, and manage [segments](https://docs.getunleash.io/reference/segments).",
|
||||
"name": "Segments",
|
||||
},
|
||||
{
|
||||
"description": "Endpoints for managing [Service Accounts](https://docs.getunleash.io/reference/service-accounts), which enable programmatic access to the Unleash API.",
|
||||
"name": "Service Accounts",
|
||||
},
|
||||
{
|
||||
"description": "Create, update, delete, manage [custom strategies](https://docs.getunleash.io/reference/custom-activation-strategies).",
|
||||
"name": "Strategies",
|
||||
|
@ -4,7 +4,7 @@ title: How to create service accounts
|
||||
|
||||
:::info availability
|
||||
|
||||
Service accounts is an upcoming enterprise feature, and is scheduled to become available in one of the next few releases.
|
||||
Service accounts is an enterprise feature available from Unleash 4.21 onwards.
|
||||
|
||||
:::
|
||||
|
||||
|
@ -4,7 +4,7 @@ title: Service accounts
|
||||
|
||||
:::info
|
||||
|
||||
Service accounts is an upcoming enterprise feature, and is scheduled to become available in one of the next few releases.
|
||||
Service accounts is an enterprise feature available from Unleash 4.21 onwards.
|
||||
|
||||
:::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user