Skip to content

fix(admin-export): never emit raw $-prefixed role in License type column (CSA-449)#2569

Open
bladata1990 wants to merge 2 commits into
mainfrom
fix/csa-449-admin-export-license-type
Open

fix(admin-export): never emit raw $-prefixed role in License type column (CSA-449)#2569
bladata1990 wants to merge 2 commits into
mainfrom
fix/csa-449-admin-export-license-type

Conversation

@bladata1990

Copy link
Copy Markdown
Collaborator

Problem

The Users export's License type column showed the raw system identifier $guest (also $admin/$member) for some users instead of the display name Guest.

Root cause in Users.kt: the column preferred assignedRole.description but its elvis fallback was workspaceRole, which is the $-prefixed system identifier. Any user with a null/blank assignedRole.description (e.g. assignedRole null entirely) leaked the raw value.

Fix

Extracted resolution into a testable Users.licenseTypeOf() with a 4-step fallback that humanizes the system identifier ($guestGuest), so a $-prefixed value is never written regardless of which fields the IAM/Heracles response populates. Added LicenseTypeTest (7 cases) covering every path.

Verification (fs3 / cusucwap01)

  • Snapshot image built by CI: https://github.com/atlanhq/atlan-java/actions/runs/27594286370
  • Deployed ghcr.io/atlanhq/csa-admin-export:7.2.4-SNAPSHOT to fs3, ran from Argo (Succeeded)
  • The bug-triggering user demo-disabled-training (assignedRole=null, workspaceRole=$guest) now exports Guest in the License type column (was $guest); the other 136 users resolve via description as before — no regression.

Closes CSA-449.

🤖 Generated with Claude Code

bladata1990 and others added 2 commits June 16, 2026 10:01
…umn (CSA-449)

The Users export preferred assignedRole.description (display name, e.g.
"Guest") but its elvis fallback was workspaceRole, which is the raw
"$"-prefixed system identifier (e.g. "$guest"). Whenever assignedRole was
null or its description was null/blank, the "License type" column leaked
"$guest"/"$admin"/"$member" instead of the human-readable name.

Extract resolution into a testable Users.licenseTypeOf() with a 4-step
fallback that humanizes the system identifier ("$guest" -> "Guest") so a
"$"-prefixed value is never written, regardless of which fields the
IAM/Heracles response populates. Add LicenseTypeTest covering all paths.

ci(temp): add this branch to the merge.yml push trigger and set
fail-fast:false on custom-package-images to build a snapshot image for
test-tenant validation. Revert before raising the PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: bladata1990 <balakrishnan.r@atlan.com>
Reverts the push-trigger branch entry and fail-fast:false added for
snapshot image testing. merge.yml now matches main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: bladata1990 <balakrishnan.r@atlan.com>
@bladata1990 bladata1990 requested a review from cmgrote as a code owner June 16, 2026 05:08
@linear

linear Bot commented Jun 16, 2026

Copy link
Copy Markdown

CSA-449

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.

1 participant