@@ -15,7 +15,7 @@ import { useCurrentOrg } from "../data/organizations/orgs-query";
1515import { useFeatureFlag } from "../data/featureflag-query" ;
1616import { Organization } from "@gitpod/public-api/lib/gitpod/v1/organization_pb" ;
1717import { useIsOwner } from "../data/organizations/members-query" ;
18- import { isGitpodIo } from "../utils " ;
18+ import { useInstallationConfiguration } from "../data/installation/default-workspace-image-query " ;
1919
2020export interface OrgSettingsPageProps {
2121 children : React . ReactNode ;
@@ -27,6 +27,9 @@ export function OrgSettingsPage({ children }: OrgSettingsPageProps) {
2727 const orgBillingMode = useOrgBillingMode ( ) ;
2828 const oidcServiceEnabled = useFeatureFlag ( "oidcServiceEnabled" ) ;
2929 const orgGitAuthProviders = useFeatureFlag ( "orgGitAuthProviders" ) ;
30+ const isOnboardingEnabled = useFeatureFlag ( "enterprise_onboarding_enabled" ) ;
31+ const { data : installationConfig } = useInstallationConfiguration ( ) ;
32+ const isDedicatedInstallation = ! ! installationConfig ?. isDedicatedInstallation ;
3033
3134 const menu = useMemo (
3235 ( ) =>
@@ -36,8 +39,18 @@ export function OrgSettingsPage({ children }: OrgSettingsPageProps) {
3639 ssoEnabled : oidcServiceEnabled ,
3740 orgGitAuthProviders,
3841 isOwner,
42+ isDedicatedInstallation,
43+ showOnboarding : isOnboardingEnabled && isDedicatedInstallation ,
3944 } ) ,
40- [ org . data , orgBillingMode . data , oidcServiceEnabled , orgGitAuthProviders , isOwner ] ,
45+ [
46+ org . data ,
47+ orgBillingMode . data ,
48+ oidcServiceEnabled ,
49+ orgGitAuthProviders ,
50+ isOwner ,
51+ isDedicatedInstallation ,
52+ isOnboardingEnabled ,
53+ ] ,
4154 ) ;
4255
4356 const title = "Organization Settings" ;
@@ -76,8 +89,10 @@ function getOrgSettingsMenu(params: {
7689 ssoEnabled ?: boolean ;
7790 orgGitAuthProviders : boolean ;
7891 isOwner ?: boolean ;
92+ showOnboarding ?: boolean ;
93+ isDedicatedInstallation ?: boolean ;
7994} ) {
80- const { billingMode, ssoEnabled, orgGitAuthProviders, isOwner } = params ;
95+ const { billingMode, ssoEnabled, orgGitAuthProviders, isOwner, showOnboarding , isDedicatedInstallation } = params ;
8196 const result = [
8297 {
8398 title : "General" ,
@@ -87,12 +102,8 @@ function getOrgSettingsMenu(params: {
87102 title : "Policies" ,
88103 link : [ `/settings/policy` ] ,
89104 } ,
90- {
91- title : "Onboarding" ,
92- link : [ `/settings/onboarding` ] ,
93- } ,
94105 ] ;
95- if ( isGitpodIo ( ) ) {
106+ if ( ! isDedicatedInstallation ) {
96107 result . push (
97108 {
98109 title : "Networking" ,
@@ -104,6 +115,12 @@ function getOrgSettingsMenu(params: {
104115 } ,
105116 ) ;
106117 }
118+ if ( showOnboarding ) {
119+ result . push ( {
120+ title : "Onboarding" ,
121+ link : [ `/settings/onboarding` ] ,
122+ } ) ;
123+ }
107124 if ( isOwner && ssoEnabled ) {
108125 result . push ( {
109126 title : "SSO" ,
0 commit comments