Skip to content

fix prevent duplicate role badges - #704

Merged
LrxGaelle merged 1 commit into
developfrom
fix/user-role-badge
Jul 28, 2026
Merged

fix prevent duplicate role badges#704
LrxGaelle merged 1 commit into
developfrom
fix/user-role-badge

Conversation

@LrxGaelle

@LrxGaelle LrxGaelle commented Jul 28, 2026

Copy link
Copy Markdown
Member

Description

This PR fixes an issue where multiple role badges could be displayed for the same user (e.g. Space Admin and Space User at the same time).
The role badge resolution has been simplified by centralizing the decision logic into a single computed property, ensuring that only one badge is displayed according to the user's effective role.

Changes

  • Fix duplicate role badge display.
  • Refactor UserRoleBadge to compute a single badgeKey.
  • Remove redundant role prop from UserRoleBadge.
  • Simplify UserCard by passing only the required role information (cloudRole, projectRole, isSpaceRole).
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue) DON'T FORGET TO SEND THE PR INTO RELEASE
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project.
  • I have tested my code.
  • My code add or change i18n tokens
  • I want to run the tests for the commits of this PR

@LrxGaelle LrxGaelle self-assigned this Jul 28, 2026
@LrxGaelle
LrxGaelle requested a review from NicolasRichel July 28, 2026 13:13
@LrxGaelle
LrxGaelle requested a review from GabBimdata July 28, 2026 13:29
@LrxGaelle
LrxGaelle merged commit 1b8c8f8 into develop Jul 28, 2026
3 of 4 checks passed
@LrxGaelle
LrxGaelle deleted the fix/user-role-badge branch July 28, 2026 13:37
NicolasRichel added a commit that referenced this pull request Jul 28, 2026
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