Skip to content

fix(gws): coerce target_org_units to array in check-user-filter#2681

Merged
tofikwest merged 1 commit into
releasefrom
tofik/cherrypick-gws-userfilter-fix
Apr 27, 2026
Merged

fix(gws): coerce target_org_units to array in check-user-filter#2681
tofikwest merged 1 commit into
releasefrom
tofik/cherrypick-gws-userfilter-fix

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

@tofikwest tofikwest commented Apr 27, 2026

Summary

Cherry-pick of 65e60cc from main onto release so we can ship this fix without bringing along the rest of main's in-flight changes.

Fixes the Google Workspace check-user-filter crash where target_org_units (multi-select) is stored as a string when only a single value is saved. The code assumed it was always an array, causing .join() and .some() to throw 'join is not a function'.

Hit in production by Snoonu's GWS 2FA check.

Changes

  • parseGoogleWorkspaceCheckUserFilter: coerce string values into a single-element array; return undefined when missing.
  • Added 2 tests: string coercion + missing value.

Why cherry-pick

main has unrelated changes not yet ready for prod. This is a self-contained hotfix — only touches packages/integration-platform/src/manifests/google-workspace/.

Test plan

  • CI green on this PR
  • After release deploy, verify Snoonu's GWS 2FA check no longer throws

Summary by cubic

Hotfix for Google Workspace user filter: coerce target_org_units to an array when a single value is stored as a string. Prevents "join is not a function" crashes in the GWS 2FA check.

  • Bug Fixes
    • Updated parseGoogleWorkspaceCheckUserFilter to return an array for target_org_units (string -> [string], missing -> undefined).
    • Added tests for string coercion and missing value.

Written for commit f5e6754. Summary will update on new commits. Review in cubic

The target_org_units variable (multi-select) can be stored as a string
when a single value is saved. The code assumed it was always an array,
causing .join() and .some() to crash with 'join is not a function'.

Coerce string values to a single-element array in parseGoogleWorkspaceCheckUserFilter.

Fixes: Snoonu customer GWS 2FA check failing with 'userFilterConfig.targetOrgUnits.join is not a function'
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Apr 27, 2026 2:57pm
comp-framework-editor Ready Ready Preview, Comment Apr 27, 2026 2:57pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Apr 27, 2026 2:57pm

Request Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Auto-approved: Isolated bug fix for a type-related crash. Coerces string input to the expected array format in a single manifest parser. Low risk with tests included.

@tofikwest tofikwest merged commit 6df1092 into release Apr 27, 2026
11 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.33.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants