Skip to content

Commit

Permalink
Fix CIS metadata flag location
Browse files Browse the repository at this point in the history
  • Loading branch information
dividehex committed Dec 9, 2024
1 parent 43832c6 commit 520b8e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tf/actions/activateNewUsersInCIS.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports.onExecutePostLogin = async (event, api) => {
}

// If you're explicitly flagged as existing in CIS, then we don't need to continue onward
if (event.user.user_metadata.existsInCIS) {
if (event.user.app_metadata?.existsInCIS) {
console.log(`${event.user.user_id} existsInCIS is True. Skip activateNewUsersInCIS`);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion tf/tests/activateNewUsersInCIS.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ test('When existsInCIS is already set, expect empty logs and workflow to continu
fetch.mockImplementation(fetchRespCallback);

// Set existsInCIS in user metadata
_event.user.user_metadata = { existsInCIS: true };
_event.user.app_metadata = { existsInCIS: true };

// Execute onExecutePostLogin
await onExecutePostLogin(_event, api);
Expand Down

0 comments on commit 520b8e9

Please sign in to comment.