Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8c83422
feat: add create new group button
jakubstec Mar 18, 2026
d4b2c6a
feat: RHP modal routing for new group creating
jakubstec Mar 18, 2026
fb8847c
fix: add missing sentry label
jakubstec Mar 19, 2026
216c81d
feat: rhp form with security group name input
jakubstec Mar 19, 2026
b4c0e49
feat: Add form toggles with state management, prettier fix
jakubstec Mar 20, 2026
99e75aa
feat: Handle Preferred Workspace setting
jakubstec Mar 20, 2026
320576d
feat: add create group onSubmit functionality and error handling
jakubstec Mar 24, 2026
0bc08f8
feat: add tests for createDomainSecurityGroup and clearGroupCreateError
jakubstec Mar 24, 2026
27cf984
resolve merge conflicts
jakubstec Apr 8, 2026
928094d
resolve merge conflict
jakubstec Apr 8, 2026
ba53b3f
fix: add missing translation files
jakubstec Apr 8, 2026
989facd
resolve merge conflicts
jakubstec Apr 8, 2026
3d4135c
add missing translations, add blocking modal when admin has no polici…
jakubstec Apr 17, 2026
e488481
add setDefaultSecurityGroup function
jakubstec Apr 17, 2026
7103588
use CreateDomainSecurityGroup instead of UpdateDomainSecurityGroup AP…
jakubstec Apr 17, 2026
23f1678
Merge remote-tracking branch 'origin/main' into jakubstec/domains/sec…
jakubstec Apr 27, 2026
d34f2b7
minor fixes after resolving merge conflict
jakubstec Apr 27, 2026
c3581dd
Merge remote-tracking branch 'origin/main' into jakubstec/domains/sec…
jakubstec Apr 29, 2026
8d533b7
fix: eslint and error handling
jakubstec Apr 29, 2026
e6350e8
Merge remote-tracking branch 'upstream/main' into jakubstec/domains/s…
jakubstec May 6, 2026
39ed071
fix: add missing API parameter
jakubstec May 6, 2026
5843328
fix: use CREATE_DOMAIN_SECURITY_GROUP API command, add shouldSetAsDef…
jakubstec May 6, 2026
495c43f
fix: refactor pending actions for group creation and deletion
jakubstec May 6, 2026
9e78b54
Merge remote-tracking branch 'upstream/main' into jakubstec/domains/s…
jakubstec May 7, 2026
49eacae
refactor: make changes related to previously merged PRs that Create G…
jakubstec May 7, 2026
86e49c5
fix: update tests to call CREATE_DOMAIN_SECURITY_GROUP command
jakubstec May 7, 2026
ec24dd1
fix: Optimistically mark the new default group
jakubstec May 7, 2026
4aec51e
apply review changes, update tests, reorder policy selectors, lint fixes
jakubstec May 7, 2026
70c0ed1
fix: fall back to the default workspace ID on submit
jakubstec May 7, 2026
6319af5
fix: lint
jakubstec May 7, 2026
4040e33
fix: add eslint justification
jakubstec May 8, 2026
3e46b2b
fix: add docs
jakubstec May 11, 2026
08451ce
Merge remote-tracking branch 'origin/main' into jakubstec/domains/sec…
jakubstec May 11, 2026
c6ca325
Merge remote-tracking branch 'origin/main' into jakubstec/domains/sec…
jakubstec May 12, 2026
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
5 changes: 5 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9657,6 +9657,11 @@ const CONST = {
SAFE_AREA: {
DISMISS_KEYBOARD_LANDSCAPE_MODE: 'SafeArea-DismissKeyboardLandscapeMode',
},
DOMAIN: {
GROUPS: {
CREATE_GROUP_BUTTON: 'DomainGroups-CreateGroupButton',
},
},
},

DOMAIN: {
Expand Down
7 changes: 7 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,9 @@ const ONYXKEYS = {
/** The transaction IDs to be highlighted when opening the Expenses search route page */
TRANSACTION_IDS_HIGHLIGHT_ON_SEARCH_ROUTE: 'transactionIdsHighlightOnSearchRoute',

/** The preferred policy ID to be used when creating a group */
DOMAIN_GROUP_CREATE_PREFERRED_POLICY_ID: 'domainGroupCreatePreferredPolicyID',

/** Collection Keys */
COLLECTION: {
ATTACHMENT: 'attachment_',
Expand Down Expand Up @@ -1118,6 +1121,8 @@ const ONYXKEYS = {
EDIT_DOMAIN_GROUP_NAME_FORM_DRAFT: 'editDomainGroupNameFormDraft',
ADD_AGENT_FORM: 'addAgentForm',
ADD_AGENT_FORM_DRAFT: 'addAgentFormDraft',
CREATE_DOMAIN_GROUP_FORM: 'createDomainGroupForm',
CREATE_DOMAIN_GROUP_FORM_DRAFT: 'createDomainGroupFormDraft',
},
DERIVED: {
REPORT_ATTRIBUTES: 'reportAttributes',
Expand Down Expand Up @@ -1264,6 +1269,7 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.ADD_WORK_EMAIL_FORM]: FormTypes.AddWorkEmailForm;
[ONYXKEYS.FORMS.EDIT_DOMAIN_GROUP_NAME_FORM]: FormTypes.DomainGroupEditNameForm;
[ONYXKEYS.FORMS.ADD_AGENT_FORM]: FormTypes.AddAgentForm;
[ONYXKEYS.FORMS.CREATE_DOMAIN_GROUP_FORM]: FormTypes.DomainGroupCreateForm;
};

type OnyxFormDraftValuesMapping = {
Expand Down Expand Up @@ -1583,6 +1589,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.HAS_DENIED_CONTACT_IMPORT_PROMPT]: boolean | undefined;
[ONYXKEYS.PERSONAL_POLICY_ID]: string;
[ONYXKEYS.TRANSACTION_IDS_HIGHLIGHT_ON_SEARCH_ROUTE]: Record<string, Record<string, boolean>>;
[ONYXKEYS.DOMAIN_GROUP_CREATE_PREFERRED_POLICY_ID]: string | undefined;
};

type OnyxDerivedValuesMapping = {
Expand Down
9 changes: 9 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4135,6 +4135,15 @@ const ROUTES = {
route: 'domain/:domainAccountID/groups/:groupID/preferred-workspace',
getRoute: (domainAccountID: number, groupID: string) => `domain/${domainAccountID}/groups/${groupID}/preferred-workspace` as const,
},

DOMAIN_GROUP_CREATE: {
route: 'domain/:domainAccountID/groups/new',
getRoute: (domainAccountID: number) => `domain/${domainAccountID}/groups/new` as const,
},
DOMAIN_GROUP_CREATE_PREFERRED_WORKSPACE: {
route: 'domain/:domainAccountID/groups/new/preferred-workspace',
getRoute: (domainAccountID: number) => `domain/${domainAccountID}/groups/new/preferred-workspace` as const,
},
} as const;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,8 @@ const SCREENS = {
GROUP_DETAILS: 'Domain_Group_Details',
GROUP_EDIT_NAME: 'Domain_Group_Edit_Name',
SECURITY_GROUPS_PREFERRED_WORKSPACE: 'Domain_Security_Groups_Preferred_Workspace',
GROUP_CREATE: 'Domain_Group_Create',
GROUP_CREATE_PREFERRED_WORKSPACE: 'Domain_Group_Create_Preferred_Workspace',
},
MULTIFACTOR_AUTHENTICATION: {
MAGIC_CODE: 'Multifactor_Authentication_Magic_Code',
Expand Down
9 changes: 6 additions & 3 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9235,7 +9235,13 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
`Möchtest du ${newName} wirklich zur Standardgruppe machen? Neue Mitglieder werden zu dieser Gruppe anstelle der bisherigen Standardgruppe (${currentName}) eingeladen. `,
makeDefault: 'Als Standard festlegen',
neverMind: 'Vergiss es',
createGroupError: 'Diese Gruppe konnte nicht erstellt werden. Bitte versuche es erneut.',
permissions: 'Gruppenberechtigungen',
createNewGroupButton: 'Neue Gruppe',
createGroupSubmitButton: 'Gruppe erstellen',
expensifyCardPreferredWorkspace: 'Expensify Card bevorzugter Arbeitsbereich',
expensifyCardPreferredWorkspaceDescription:
'Alle Expensify Card-Transaktionen werden im bevorzugten Expensify Card-Arbeitsbereich anstelle des bevorzugten Arbeitsbereichs erstellt. Durch Aktivieren dieser Funktion wird die Einstellung des bevorzugten Arbeitsbereichs nur für Expensify Card-Transaktionen überschrieben.',
strictlyEnforceWorkspaceRules: 'Workspace-Regeln strikt durchsetzen',
strictlyEnforceWorkspaceRulesDescription: 'Alle Workspace-Regeln müssen erfüllt sein, bevor ein Bericht eingereicht wird. Manuelle Ausnahmen sind nicht zulässig.',
restrictExpenseWorkspaceCreation: 'Erstellen/Entfernen von Ausgaben-Workspaces einschränken',
Expand All @@ -9253,9 +9259,6 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
restrictDefaultLoginSelection: 'Standard-Login-Auswahl einschränken',
restrictDefaultLoginSelectionDescription:
'Verhindert, dass Mitglieder ihre Login-E-Mail-Adresse außerhalb der Unternehmensdomäne ändern, um Richtlinienbeschränkungen zu umgehen.',
expensifyCardPreferredWorkspace: 'Bevorzugter Workspace für die Expensify Card',
expensifyCardPreferredWorkspaceDescription:
'Alle Expensify-Card-Transaktionen werden im bevorzugten Workspace für die Expensify Card statt im bevorzugten Workspace erstellt. Die Aktivierung dieser Funktion überschreibt die Einstellung des bevorzugten Workspace ausschließlich für Expensify-Card-Transaktionen.',
expensifyCardPreferredWorkspaceDisabledMessage:
'Um diese Einstellung zu verwenden, muss der bevorzugte Workspace aktiviert und für die Domain die Expensify Card eingerichtet sein.',
findGroup: 'Gruppe suchen',
Expand Down
9 changes: 6 additions & 3 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9241,7 +9241,13 @@ const translations = {
`Are you sure you want to make ${newName} the default group? New members will be invited to this group instead of the previous default group (${currentName}). `,
makeDefault: 'Make default',
neverMind: 'Never mind',
createGroupError: 'Unable to create this group. Please try again.',
permissions: 'Group permissions',
createNewGroupButton: 'New group',
createGroupSubmitButton: 'Create group',
expensifyCardPreferredWorkspace: 'Expensify Card Preferred Workspace',
expensifyCardPreferredWorkspaceDescription:
'All Expensify Card transactions will be created on the Expensify Card Preferred Workspace instead of the Preferred Workspace. Enabling this feature will override the Preferred Workspace setting for Expensify Card transactions only.',
strictlyEnforceWorkspaceRules: 'Strictly enforce workspace rules',
strictlyEnforceWorkspaceRulesDescription: 'All workspace rules must be met before submitting a report. No manual exceptions allowed.',
restrictExpenseWorkspaceCreation: 'Restrict expense workspace creation/removal',
Expand All @@ -9258,9 +9264,6 @@ const translations = {
noWorkspacesMessage: 'There are no workspaces on this domain. A workspace is required to enable this restriction.',
restrictDefaultLoginSelection: 'Restrict default login selection',
restrictDefaultLoginSelectionDescription: 'Prevent members from changing their login email away from their company domain to avoid policy restrictions.',
expensifyCardPreferredWorkspace: 'Expensify Card Preferred Workspace',
expensifyCardPreferredWorkspaceDescription:
'All Expensify Card transactions will be created on the Expensify Card Preferred Workspace instead of the Preferred Workspace. Enabling this feature will override the Preferred Workspace setting for Expensify Card transactions only.',
expensifyCardPreferredWorkspaceDisabledMessage: 'To use this setting, Preferred Workspace must be enabled and the domain must have Expensify Card set up.',
findGroup: 'Find group',
},
Expand Down
9 changes: 6 additions & 3 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9434,7 +9434,13 @@ ${amount} para ${merchant} - ${date}`,
`¿Estás seguro de que quieres establecer ${newName} como el grupo predeterminado? Los nuevos miembros serán invitados a este grupo en lugar del grupo predeterminado anterior (${currentName}). `,
makeDefault: 'Establecer como predeterminado',
neverMind: 'No importa',
createGroupError: 'No se pudo crear este grupo. Inténtalo de nuevo.',
permissions: 'Permisos de grupo',
createNewGroupButton: 'Nuevo grupo',
createGroupSubmitButton: 'Crear grupo',
expensifyCardPreferredWorkspace: 'Espacio de trabajo preferido para Expensify Card',
expensifyCardPreferredWorkspaceDescription:
'Todas las transacciones de Expensify Card se crearán en el espacio de trabajo preferido de Expensify Card en lugar del espacio de trabajo preferido. Al habilitar esta función, la configuración de espacio de trabajo preferido se aplicará solo a las transacciones de Expensify Card.',
strictlyEnforceWorkspaceRules: 'Hacer cumplir estrictamente las reglas del espacio de trabajo',
strictlyEnforceWorkspaceRulesDescription: 'Todas las reglas del espacio de trabajo deben cumplirse antes de enviar un informe. No se permiten excepciones manuales.',
restrictExpenseWorkspaceCreation: 'Restringir la creación/eliminación de espacios de trabajo de gastos',
Expand All @@ -9452,9 +9458,6 @@ ${amount} para ${merchant} - ${date}`,
noWorkspacesMessage: 'No hay espacios de trabajo en este dominio. Se requiere un espacio de trabajo para habilitar esta restricción.',
restrictDefaultLoginSelection: 'Restringir el inicio de sesión predeterminado',
restrictDefaultLoginSelectionDescription: 'Evita que los miembros cambien su correo de inicio de sesión fuera del dominio de la empresa para eludir restricciones de políticas.',
expensifyCardPreferredWorkspace: 'Espacio de trabajo preferido para Expensify Card',
expensifyCardPreferredWorkspaceDescription:
'Todas las transacciones de Expensify Card se crearán en el espacio de trabajo preferido de Expensify Card en lugar del espacio de trabajo preferido. Al habilitar esta función, la configuración de espacio de trabajo preferido se aplicará solo a las transacciones de Expensify Card.',
expensifyCardPreferredWorkspaceDisabledMessage:
'Para usar esta configuración, el espacio de trabajo preferido debe estar habilitado y el dominio debe tener Expensify Card configurada.',
findGroup: 'Encontrar grupo',
Expand Down
9 changes: 6 additions & 3 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9258,7 +9258,13 @@ Voici un *reçu test* pour vous montrer comment ça fonctionne :`,
`Êtes-vous sûr de vouloir faire de ${newName} le groupe par défaut ? Les nouveaux membres seront invités à ce groupe au lieu du groupe par défaut précédent (${currentName}). `,
makeDefault: 'Définir par défaut',
neverMind: 'Peu importe',
createGroupError: 'Impossible de créer ce groupe. Veuillez réessayer.',
permissions: 'Autorisations du groupe',
createNewGroupButton: 'Nouveau groupe',
createGroupSubmitButton: 'Créer le groupe',
expensifyCardPreferredWorkspace: "Espace de travail préféré pour l'Expensify Card",
expensifyCardPreferredWorkspaceDescription:
"Toutes les transactions Expensify Card seront créées dans l'espace de travail préféré Expensify Card au lieu de l'espace de travail préféré.",
strictlyEnforceWorkspaceRules: 'Appliquer strictement les règles de l’espace de travail',
strictlyEnforceWorkspaceRulesDescription:
'Toutes les règles de l’espace de travail doivent être respectées avant de soumettre un rapport. Aucune exception manuelle n’est autorisée.',
Expand All @@ -9278,9 +9284,6 @@ Voici un *reçu test* pour vous montrer comment ça fonctionne :`,
restrictDefaultLoginSelection: 'Restreindre la sélection de connexion par défaut',
restrictDefaultLoginSelectionDescription:
'Empêche les membres de modifier leur e-mail de connexion en dehors du domaine de leur entreprise afin d’éviter les restrictions de politique.',
expensifyCardPreferredWorkspace: 'Espace de travail préféré pour la Expensify Card',
expensifyCardPreferredWorkspaceDescription:
'Toutes les transactions Expensify Card seront créées dans l’espace de travail préféré pour la Expensify Card au lieu de l’espace de travail préféré. L’activation de cette fonctionnalité remplacera le paramètre d’espace de travail préféré uniquement pour les transactions Expensify Card.',
expensifyCardPreferredWorkspaceDisabledMessage:
'Pour utiliser ce paramètre, l’espace de travail préféré doit être activé et la Expensify Card doit être configurée pour le domaine.',
findGroup: 'Trouver un groupe',
Expand Down
9 changes: 6 additions & 3 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9227,7 +9227,13 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
`Sei sicuro di voler impostare ${newName} come gruppo predefinito? I nuovi membri verranno invitati a questo gruppo invece del precedente gruppo predefinito (${currentName}). `,
makeDefault: 'Imposta come predefinito',
neverMind: 'Lascia perdere',
createGroupError: 'Impossibile creare questo gruppo. Riprova.',
permissions: 'Autorizzazioni del gruppo',
createNewGroupButton: 'Nuovo gruppo',
createGroupSubmitButton: 'Crea gruppo',
expensifyCardPreferredWorkspace: 'Area di lavoro preferita per Expensify Card',
expensifyCardPreferredWorkspaceDescription:
"Tutte le transazioni Expensify Card verranno create nell'area di lavoro preferita Expensify Card anziché nell'area di lavoro preferita.",
strictlyEnforceWorkspaceRules: 'Applica rigorosamente le regole dello spazio di lavoro',
strictlyEnforceWorkspaceRulesDescription: 'Tutte le regole dello spazio di lavoro devono essere soddisfatte prima di inviare un rapporto. Non sono consentite eccezioni manuali.',
restrictExpenseWorkspaceCreation: 'Limita la creazione/rimozione dell’area di lavoro spese',
Expand All @@ -9245,9 +9251,6 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
noWorkspacesMessage: 'Non ci sono spazi di lavoro su questo dominio. È necessario uno spazio di lavoro per abilitare questa restrizione.',
restrictDefaultLoginSelection: 'Limita la selezione di accesso predefinita',
restrictDefaultLoginSelectionDescription: 'Impedisce ai membri di modificare l’email di accesso al di fuori del dominio aziendale per eludere le restrizioni delle policy.',
expensifyCardPreferredWorkspace: 'Area di lavoro preferita per Expensify Card',
expensifyCardPreferredWorkspaceDescription:
'Tutte le transazioni Expensify Card verranno create nell’area di lavoro preferita per Expensify Card anziché nell’area di lavoro preferita. L’attivazione di questa funzione sostituirà l’impostazione dell’area di lavoro preferita solo per le transazioni Expensify Card.',
expensifyCardPreferredWorkspaceDisabledMessage:
'Per utilizzare questa impostazione, l’area di lavoro preferita deve essere abilitata e la Expensify Card deve essere configurata per il dominio.',
findGroup: 'Trova gruppo',
Expand Down
8 changes: 5 additions & 3 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9110,7 +9110,12 @@ ${reportName}
`本当に ${newName} をデフォルトグループに設定しますか?新しいメンバーは、以前のデフォルトグループ (${currentName}) ではなく、このグループに招待されます。`,
makeDefault: 'デフォルトに設定',
neverMind: 'やめておく',
createGroupError: 'このグループを作成できませんでした。もう一度お試しください。',
permissions: 'グループの権限',
createNewGroupButton: '新しいグループ',
createGroupSubmitButton: 'グループを作成',
expensifyCardPreferredWorkspace: 'Expensify Card 優先ワークスペース',
expensifyCardPreferredWorkspaceDescription: 'すべてのExpensify Cardトランザクションは、優先ワークスペースではなくExpensify Card優先ワークスペースで作成されます。',
strictlyEnforceWorkspaceRules: 'ワークスペースのルールを厳密に適用する',
strictlyEnforceWorkspaceRulesDescription: 'レポートを送信する前にすべてのワークスペースのルールを満たす必要があります。手動による例外は許可されていません。',
restrictExpenseWorkspaceCreation: '経費ワークスペースの作成/削除を制限する',
Expand All @@ -9127,9 +9132,6 @@ ${reportName}
noWorkspacesMessage: 'このドメインにワークスペースがありません。この制限を有効にするにはワークスペースが必要です。',
restrictDefaultLoginSelection: 'デフォルトのログイン選択を制限する',
restrictDefaultLoginSelectionDescription: 'メンバーがポリシー制限を回避するために、ログイン用のメールアドレスを会社のドメイン以外に変更することを防ぎます。',
expensifyCardPreferredWorkspace: 'Expensify Card 優先ワークスペース',
expensifyCardPreferredWorkspaceDescription:
'すべての Expensify Card トランザクションは、優先ワークスペースではなく Expensify Card 優先ワークスペースで作成されます。この機能を有効にすると、Expensify Card トランザクションに対してのみ優先ワークスペースの設定が上書きされます。',
expensifyCardPreferredWorkspaceDisabledMessage: 'この設定を使用するには、優先ワークスペースを有効にし、ドメインに Expensify Card が設定されている必要があります。',
findGroup: 'グループを検索',
},
Expand Down
Loading
Loading