Skip to content

Fix team organizationRole assertion for RBAC orgs#561

Merged
aniket-shikhare-cstk merged 1 commit into
developmentfrom
fix/team-organizationRoles-rbac
Jun 11, 2026
Merged

Fix team organizationRole assertion for RBAC orgs#561
aniket-shikhare-cstk merged 1 commit into
developmentfrom
fix/team-organizationRoles-rbac

Conversation

@aniket-shikhare-cstk

@aniket-shikhare-cstk aniket-shikhare-cstk commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • RBAC-enabled organizations changed the team create response field from organizationRole (singular string) to organizationRoles (plural array), causing the sanity assertion at team-test.js:90 to fail with expected undefined to exist on dev11.
  • Updated the assertion to accept either field so it passes on both legacy and RBAC-enabled orgs.

Context

Reported by Bala: "For RBAC orgs, the response is changed to organizationRoles, please update the sanity accordingly."

  • API call still succeeds (HTTP 201, team created correctly).
  • Request payload is unchanged — the API still accepts organizationRole (singular) as input.
  • Only the response field name changed, so only the response-side assertion needed updating.

Test plan

  • Re-run sanity pipeline — team create should pass.
  • Verify on a non-RBAC org that the assertion still passes via response.organizationRole.

RBAC-enabled organizations now return organizationRoles (plural array)
instead of organizationRole (singular string) in the team create response.
Accept either field so the assertion passes on both legacy and RBAC orgs.
@aniket-shikhare-cstk aniket-shikhare-cstk requested a review from a team as a code owner June 11, 2026 08:03
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@github-actions

Copy link
Copy Markdown

Coverage report for commit: f21efbc
File: coverage/clover.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ██░░░░░░░░░░░░░░░░░░░░░ │  2.1%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ █████░░░░░░░░░░░░░░░░░░ │  6.4%
  80% │ ███████████████████████ │ 36.2%
  90% │ ██████████████████░░░░░ │ 27.7%
 100% │ ██████████████████░░░░░ │ 27.7%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 82.73% | Methods: 95.87% | Branches: 65.85%
FilesLinesMethodsBranches
lib
   contentstack.js100.00%100.00%100.00%
   contentstackClient.js83.02%92.86%69.49%
   contentstackCollection.js94.12%100.00%86.96%
   entity.js76.22%100.00%61.34%
lib/core
   Util.js77.68%94.44%61.65%
   concurrency-queue.js71.84%72.22%62.02%
   contentstackError.js100.00%100.00%100.00%
   contentstackHTTPClient.js83.05%84.62%75.00%
   errorMessages.js100.00%100.00%71.43%
   moduleHeaderSupport.js89.71%100.00%83.67%
   oauthHandler.js90.85%100.00%67.14%
   pkceStorage.js100.00%100.00%94.12%
lib/organization
   index.js72.73%100.00%48.68%
lib/organization/teams
   index.js89.47%100.00%61.11%
lib/organization/teams/stackRoleMappings
   index.js78.57%100.00%47.50%
lib/organization/teams/teamUsers
   index.js100.00%100.00%87.50%
lib/query
   index.js75.51%100.00%59.62%
lib/stack/asset/folders
   index.js100.00%100.00%94.74%
lib/stack/asset
   index.js86.75%100.00%72.63%
lib/stack/auditlog
   index.js92.31%100.00%70.59%
lib/stack/branch
   compare.js70.83%100.00%60.00%
   index.js91.49%100.00%68.89%
   mergeQueue.js85.71%100.00%63.16%
lib/stack/branchAlias
   index.js80.65%100.00%59.52%
lib/stack/contentType/entry
   index.js83.33%100.00%57.84%
lib/stack/contentType/entry/variants
   index.js80.65%100.00%60.00%
lib/stack/contentType
   index.js85.29%100.00%68.00%
lib/stack/deliveryToken
   index.js95.65%80.00%85.71%
lib/stack/deliveryToken/previewToken
   index.js25.00%25.00%6.67%
lib/stack/environment
   index.js100.00%100.00%95.00%
lib/stack/extension
   index.js94.12%100.00%81.40%
lib/stack/globalField
   index.js92.11%100.00%81.13%
lib/stack
   index.js81.31%92.86%68.27%
lib/stack/label
   index.js100.00%100.00%93.75%
lib/stack/locale
   index.js100.00%100.00%95.00%
lib/stack/managementToken
   index.js100.00%100.00%90.00%
lib/stack/release
   index.js80.70%100.00%59.02%
lib/stack/roles
   index.js100.00%100.00%94.44%
lib/stack/taxonomy
   index.js78.35%100.00%52.07%
lib/stack/taxonomy/terms
   index.js79.31%100.00%56.96%
lib/stack/variantGroup
   index.js82.50%100.00%58.14%
lib/stack/variantGroup/variants
   index.js78.57%100.00%52.94%
lib/stack/variants
   index.js77.50%100.00%51.06%
lib/stack/webhook
   index.js85.00%100.00%64.29%
lib/stack/workflow
   index.js84.21%100.00%66.67%
lib/stack/workflow/publishRules
   index.js100.00%100.00%95.00%
lib/user
   index.js91.43%100.00%73.08%

🤖 comment via lucassabreu/comment-coverage-clover

@aniket-shikhare-cstk aniket-shikhare-cstk merged commit 391fcc0 into development Jun 11, 2026
13 checks passed
@aniket-shikhare-cstk aniket-shikhare-cstk deleted the fix/team-organizationRoles-rbac branch June 11, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants