Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Mechler committed Oct 11, 2022
1 parent 9170edf commit f9b0e4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/actions/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
3 changes: 3 additions & 0 deletions src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f9b0e4a

Please sign in to comment.