Skip to content

fix(FR-2775): localize ROLE_ASSIGNMENT and resolve scope name in permission modal#7155

Open
ironAiken2 wants to merge 1 commit intomainfrom
fix/FR-2775-rbac-permission-modal-scope-label
Open

fix(FR-2775): localize ROLE_ASSIGNMENT and resolve scope name in permission modal#7155
ironAiken2 wants to merge 1 commit intomainfrom
fix/FR-2775-rbac-permission-modal-scope-label

Conversation

@ironAiken2
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 commented Apr 29, 2026

Resolves #7154 (FR-2775)

Summary

  • Add rbac.types.ROLE_ASSIGNMENT translation key to all 21 supported locales (ko: "권한 할당", en: "Role Assignment", etc.) so the Permission Type select no longer falls back to the raw API value.
  • Extend CreatePermissionModal_roleScopeFragment to fetch the resolved scope: EntityNode with inline fragments for DOMAIN / PROJECT / USER / VFOLDER / SESSION / MODEL_DEPLOYMENT / RESOURCE_GROUP / CONTAINER_REGISTRY, mirroring the pattern already used in RolePermissionTab.tsx and RoleScopeTab.tsx.
  • Render the Scope / Target select label as "<scopeType> / <resolved name>", falling back to the raw scopeId only when the scope object is unresolvable (e.g., STORAGE_HOST and KEYPAIR are not part of the EntityNode union yet).
  • The selected option value remains ${scopeType}|${scopeId} so backend submissions are unchanged.

Test plan

  • Open RBAC role detail → Add Permission, on a role whose scopes include a project: the Scope / Target select shows the project name, and the Permission Type select includes a translated ROLE_ASSIGNMENT entry.
  • Switch UI language to Korean: ROLE_ASSIGNMENT displays as "권한 할당".
  • Switch language to other locales (ja, zh-CN, fr, …) and confirm the localized label is shown.
  • Confirm scripts/verify.sh reports === ALL PASS ===.

Notes

  • STORAGE_HOST scope IDs are storage host names already, so the fallback path renders correctly. KEYPAIR scope IDs are access keys; without an EntityNode resolver they remain as the raw access-key string until backend support lands.

@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization size:L 100~500 LoC labels Apr 29, 2026
Copy link
Copy Markdown
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ironAiken2 ironAiken2 marked this pull request as ready for review April 29, 2026 09:42
Copilot AI review requested due to automatic review settings April 29, 2026 09:42
@ironAiken2 ironAiken2 added the type:fix Fix features that are not working label Apr 29, 2026
@ironAiken2 ironAiken2 requested review from agatha197, nowgnuesLee and yomybaby and removed request for Copilot April 29, 2026 09:43
@github-actions
Copy link
Copy Markdown
Contributor

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
9.03% (-0% 🔻)
1859/20580
🔴 Branches
8.19% (-0.01% 🔻)
1187/14496
🔴 Functions
5.33% (+0.02% 🔼)
297/5576
🔴 Lines
8.77% (-0% 🔻)
1750/19964

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from b3e4a02

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

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC type:fix Fix features that are not working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RBAC permission modal: localize ROLE_ASSIGNMENT and show resolved scope name

1 participant