Skip to content
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,9 @@ const ONYXKEYS = {

/** SAML login metadata for a domain */
SAML_METADATA: 'saml_metadata_',

/** Stores domain admin account ID */
EXPENSIFY_ADMIN_ACCESS_PREFIX: 'expensify_adminPermissions_',
},

/** List of Form ids */
Expand Down Expand Up @@ -1117,6 +1120,7 @@ type OnyxCollectionValuesMapping = {
[ONYXKEYS.COLLECTION.ISSUE_NEW_EXPENSIFY_CARD]: OnyxTypes.IssueNewCard;
[ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_ADMIN_ACCESS]: boolean;
[ONYXKEYS.COLLECTION.SAML_METADATA]: OnyxTypes.SamlMetadata;
[ONYXKEYS.COLLECTION.EXPENSIFY_ADMIN_ACCESS_PREFIX]: number;
};

type OnyxValuesMapping = {
Expand Down
36 changes: 20 additions & 16 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3421,38 +3421,42 @@ const ROUTES = {
getRoute: (backTo?: string) => getUrlWithBackToParam('test-tools' as const, backTo),
},
WORKSPACES_VERIFY_DOMAIN: {
route: 'workspaces/verify-domain/:accountID',
getRoute: (accountID: number) => `workspaces/verify-domain/${accountID}` as const,
route: 'workspaces/verify-domain/:domainAccountID',
getRoute: (domainAccountID: number) => `workspaces/verify-domain/${domainAccountID}` as const,
},
WORKSPACES_DOMAIN_VERIFIED: {
route: 'workspaces/domain-verified/:accountID',
getRoute: (accountID: number) => `workspaces/domain-verified/${accountID}` as const,
route: 'workspaces/domain-verified/:domainAccountID',
getRoute: (domainAccountID: number) => `workspaces/domain-verified/${domainAccountID}` as const,
},
WORKSPACES_ADD_DOMAIN: 'workspaces/add-domain',
WORKSPACES_ADD_DOMAIN_VERIFY_ACCOUNT: `workspaces/add-domain/${VERIFY_ACCOUNT}`,
WORKSPACES_DOMAIN_ADDED: {
route: 'workspaces/domain-added/:accountID',
getRoute: (accountID: number) => `workspaces/domain-added/${accountID}` as const,
route: 'workspaces/domain-added/:domainAccountID',
getRoute: (domainAccountID: number) => `workspaces/domain-added/${domainAccountID}` as const,
},
WORKSPACES_DOMAIN_ACCESS_RESTRICTED: {
route: 'workspaces/domain-access-restricted/:accountID',
getRoute: (accountID: number) => `workspaces/domain-access-restricted/${accountID}` as const,
route: 'workspaces/domain-access-restricted/:domainAccountID',
getRoute: (domainAccountID: number) => `workspaces/domain-access-restricted/${domainAccountID}` as const,
},
DOMAIN_INITIAL: {
route: 'domain/:accountID',
getRoute: (accountID: number) => `domain/${accountID}` as const,
route: 'domain/:domainAccountID',
getRoute: (domainAccountID: number) => `domain/${domainAccountID}` as const,
},
DOMAIN_SAML: {
route: 'domain/:accountID/saml',
getRoute: (accountID: number) => `domain/${accountID}/saml` as const,
route: 'domain/:domainAccountID/saml',
getRoute: (domainAccountID: number) => `domain/${domainAccountID}/saml` as const,
},
DOMAIN_VERIFY: {
route: 'domain/:accountID/verify',
getRoute: (accountID: number) => `domain/${accountID}/verify` as const,
route: 'domain/:domainAccountID/verify',
getRoute: (domainAccountID: number) => `domain/${domainAccountID}/verify` as const,
},
DOMAIN_VERIFIED: {
route: 'domain/:accountID/verified',
getRoute: (accountID: number) => `domain/${accountID}/verified` as const,
route: 'domain/:domainAccountID/verified',
getRoute: (domainAccountID: number) => `domain/${domainAccountID}/verified` as const,
},
DOMAIN_ADMINS: {
route: 'domain/:domainAccountID/admins',
getRoute: (domainAccountID: number) => `domain/${domainAccountID}/admins` as const,
},
} as const;

Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@ const SCREENS = {
VERIFIED: 'Domain_Verified',
INITIAL: 'Domain_Initial',
SAML: 'Domain_SAML',
ADMINS: 'Domain_Admins',
},
} as const;

Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/chunks/illustrations.chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import Abacus from '@assets/images/simple-illustrations/simple-illustration__aba
// Simple Illustrations - Original core ones
import Accounting from '@assets/images/simple-illustrations/simple-illustration__accounting.svg';
import Alert from '@assets/images/simple-illustrations/simple-illustration__alert.svg';
import Members from '@assets/images/simple-illustrations/simple-illustration__approval-members.svg';
import Approval from '@assets/images/simple-illustrations/simple-illustration__approval.svg';
import Binoculars from '@assets/images/simple-illustrations/simple-illustration__binoculars.svg';
import BlueShield from '@assets/images/simple-illustrations/simple-illustration__blueshield.svg';
Expand Down Expand Up @@ -315,6 +316,7 @@ const Illustrations = {
Mailbox,
ShieldYellow,
Clock,
Members,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/NavigationTabBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
const expensifyIcons = useMemoizedLazyExpensifyIcons(['ExpensifyAppIcon', 'Inbox', 'MoneySearch', 'Buildings'] as const);

const paramsPolicyID = params && 'policyID' in params ? params.policyID : undefined;
const paramsDomainAccountID = params && 'accountID' in params ? params.accountID : undefined;
const paramsDomainAccountID = params && 'domainAccountID' in params ? params.domainAccountID : undefined;

const lastViewedPolicySelector = useCallback(
(policies: OnyxCollection<Policy>) => {
Expand Down
1 change: 1 addition & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8001,6 +8001,7 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
subtitle: 'Erzwingen Sie für Mitglieder Ihrer Domain die Anmeldung per Single Sign-On, schränken Sie die Erstellung von Workspaces ein und vieles mehr.',
enable: 'Aktivieren',
},
admins: {title: 'Admins', findAdmin: 'Admin finden'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
4 changes: 4 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7845,6 +7845,10 @@ const translations = {
subtitle: 'Require members on your domain to log in via single sign-on, restrict workspace creation, and more.',
enable: 'Enable',
},
admins: {
title: 'Admins',
findAdmin: 'Find admin',
},
},
};

Expand Down
4 changes: 4 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7941,6 +7941,10 @@ ${amount} para ${merchant} - ${date}`,
subtitle: 'Solicita que los miembros de tu dominio inicien sesión mediante inicio de sesión único, restringe la creación de espacios de trabajo y más.',
enable: 'Habilitar',
},
admins: {
title: 'Administradores',
findAdmin: 'Encontrar administrador',
},
},
};

Expand Down
1 change: 1 addition & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8005,6 +8005,7 @@ Voici un *reçu test* pour vous montrer comment cela fonctionne :`,
subtitle: "Exiger que les membres de votre domaine se connectent via l'authentification unique, restreindre la création d'espaces de travail, et plus encore.",
enable: 'Activer',
},
admins: {title: 'Admins', findAdmin: 'Trouver un admin'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
1 change: 1 addition & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7980,6 +7980,7 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
subtitle: 'Richiedi ai membri del tuo dominio di accedere tramite Single Sign-On, limita la creazione di spazi di lavoro e altro ancora.',
enable: 'Abilita',
},
admins: {title: 'Amministratori', findAdmin: 'Trova amministratore'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
1 change: 1 addition & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7922,6 +7922,7 @@ Expensify の使い方をお見せするための*テストレシート*がこ
subtitle: 'ドメインのメンバーにシングルサインオンでのログインを必須化し、ワークスペースの作成を制限するなど、さらに多くのことができます。',
enable: '有効にする',
},
admins: {title: '管理者', findAdmin: '管理者を検索'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
1 change: 1 addition & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7962,6 +7962,7 @@ Hier is een *testbon* om je te laten zien hoe het werkt:`,
subtitle: 'Verplicht leden van je domein om in te loggen via single sign-on, beperk het aanmaken van werkruimten en meer.',
enable: 'Inschakelen',
},
admins: {title: 'Beheerders', findAdmin: 'Beheerder zoeken'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
1 change: 1 addition & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7950,6 +7950,7 @@ Oto *paragon testowy*, który pokazuje, jak to działa:`,
subtitle: 'Wymagaj, aby członkowie Twojej domeny logowali się przez Single Sign-On (SSO), ograniczaj tworzenie obszarów roboczych i nie tylko.',
enable: 'Włącz',
},
admins: {title: 'Administratorzy', findAdmin: 'Znajdź administratora'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
1 change: 1 addition & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7955,6 +7955,7 @@ Aqui está um *recibo de teste* para mostrar como funciona:`,
subtitle: 'Exija que os membros do seu domínio façam login por meio de logon único (SSO), restrinja a criação de espaços de trabalho e muito mais.',
enable: 'Ativar',
},
admins: {title: 'Administradores', findAdmin: 'Encontrar administrador'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
1 change: 1 addition & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7786,6 +7786,7 @@ ${reportName}
addDomain: {title: '添加域', subtitle: '请输入您想访问的私有域名(例如:expensify.com)。', domainName: '域名', newDomain: '新域名'},
domainAdded: {title: '已添加域名', description: '接下来,您需要验证域名的所有权并调整您的安全设置。', configure: '配置'},
enhancedSecurity: {title: '增强的安全性', subtitle: '要求您域内的成员使用单点登录登录、限制工作区创建等。', enable: '启用'},
admins: {title: '管理员', findAdmin: '查找管理员'},
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type ReactComponentModule from '@src/types/utils/ReactComponentModule';

const loadDomainInitialPage = () => require<ReactComponentModule>('../../../../pages/domain/DomainInitialPage').default;
const loadDomainSamlPage = () => require<ReactComponentModule>('../../../../pages/domain/DomainSamlPage').default;
const loadDomainAdminsPage = () => require<ReactComponentModule>('../../../../pages/domain/Admins/DomainAdminsPage').default;

const Split = createSplitNavigator<DomainSplitNavigatorParamList>();

Expand Down Expand Up @@ -43,6 +44,12 @@ function DomainSplitNavigator({route, navigation}: PlatformStackScreenProps<Auth
name={SCREENS.DOMAIN.SAML}
getComponent={loadDomainSamlPage}
/>

<Split.Screen
key={SCREENS.DOMAIN.ADMINS}
name={SCREENS.DOMAIN.ADMINS}
getComponent={loadDomainAdminsPage}
/>
</Split.Navigator>
</View>
</FocusTrapForScreens>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function handleOpenDomainSplitAction(
const actionToPushDomainSplitNavigator = StackActions.push(NAVIGATORS.DOMAIN_SPLIT_NAVIGATOR, {
screen: action.payload.screenName,
params: {
accountID: action.payload.accountID,
domainAccountID: action.payload.domainAccountID,
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type RootStackNavigatorActionType =
| {
type: typeof CONST.NAVIGATION.ACTION_TYPE.OPEN_DOMAIN_SPLIT;
payload: {
accountID: number;
domainAccountID: number;
screenName: DomainScreenName;
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/helpers/navigateToWorkspacesPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const navigateToWorkspacesPage = ({currentUserLogin, shouldUseNarrowLayout, poli

return navigationRef.dispatch({
type: CONST.NAVIGATION.ACTION_TYPE.OPEN_DOMAIN_SPLIT,
payload: {accountID: domain.accountID, screenName: domainScreenName},
payload: {domainAccountID: domain.accountID, screenName: domainScreenName},
});
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1929,6 +1929,9 @@ const config: LinkingOptions<RootNavigatorParamList>['config'] = {
[SCREENS.DOMAIN.SAML]: {
path: ROUTES.DOMAIN_SAML.route,
},
[SCREENS.DOMAIN.ADMINS]: {
path: ROUTES.DOMAIN_ADMINS.route,
},
},
},

Expand Down
17 changes: 10 additions & 7 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1319,10 +1319,10 @@ type SettingsNavigatorParamList = {
subRateID: string;
};
[SCREENS.DOMAIN.VERIFY]: {
accountID: number;
domainAccountID: number;
};
[SCREENS.DOMAIN.VERIFIED]: {
accountID: number;
domainAccountID: number;
};
} & ReimbursementAccountNavigatorParamList;

Expand Down Expand Up @@ -2108,18 +2108,18 @@ type MergeTransactionNavigatorParamList = {

type WorkspacesDomainModalNavigatorParamList = {
[SCREENS.WORKSPACES_VERIFY_DOMAIN]: {
accountID: number;
domainAccountID: number;
};
[SCREENS.WORKSPACES_DOMAIN_VERIFIED]: {
accountID: number;
domainAccountID: number;
};
[SCREENS.WORKSPACES_ADD_DOMAIN]: undefined;
[SCREENS.WORKSPACES_ADD_DOMAIN_VERIFY_ACCOUNT]: undefined;
[SCREENS.WORKSPACES_DOMAIN_ADDED]: {
accountID: number;
};
[SCREENS.WORKSPACES_DOMAIN_ACCESS_RESTRICTED]: {
accountID: number;
domainAccountID: number;
};
};

Expand Down Expand Up @@ -2407,10 +2407,13 @@ type WorkspaceSplitNavigatorParamList = {

type DomainSplitNavigatorParamList = {
[SCREENS.DOMAIN.INITIAL]: {
accountID: number;
domainAccountID: number;
};
[SCREENS.DOMAIN.SAML]: {
accountID: number;
domainAccountID: number;
};
[SCREENS.DOMAIN.ADMINS]: {
domainAccountID: number;
};
};

Expand Down
Loading
Loading