From f9b0e4a0f0f28844839eb0355696111beed23736 Mon Sep 17 00:00:00 2001 From: Alexander Mechler Date: Tue, 11 Oct 2022 16:43:32 -0700 Subject: [PATCH] Add comments --- src/libs/actions/App.js | 3 +++ src/libs/actions/Policy.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 653bfa751268..faa7fe87f5d3 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -187,6 +187,9 @@ function setUpPoliciesAndNavigate(session) { const isLoggingInAsNewUser = SessionUtils.isLoggingInAsNewUser(currentUrl, session.email); const url = new URL(currentUrl); const exitTo = url.searchParams.get('exitTo'); + + // Approved Accountants and Guides can enter a flow where they make a workspace for other users, + // and those are passed as a search parameter when using transition links const ownerEmail = url.searchParams.get('ownerEmail'); const makeMeAdmin = url.searchParams.get('makeMeAdmin'); diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index f3ef5276bb4b..dda3b4519fce 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -763,6 +763,9 @@ function generatePolicyID() { /** * Optimistically creates a new workspace and default workspace chats + * + * @param {String} [ownerEmail] Optional, the email of the account to make the owner of the policy + * @param {Boolean} [makeMeAdmin] Optional, leave the calling account as an admin on the policy */ function createWorkspace(ownerEmail = '', makeMeAdmin = false) { const policyID = generatePolicyID();