Skip to content

Teams UI role precedence shows member instead of owner manager #1215

@dimitri-tombroff

Description

@dimitri-tombroff

Observed issue

In the FRED UI (Teams view), Alice is shown as member in la-poste, while she should be shown as owner.

Expected behavior

If multiple relations exist for the same user on the same team, the UI (or the API feeding the UI) should display the highest role using this priority:

owner > manager > member
Evidence / verification (preflight)
Local preflight confirms the OpenFGA tuples are correct:

OpenFGA owner teams (user:alice): la-poste
OpenFGA manager teams (user:alice): la-poste, thales
OpenFGA member teams (user:alice): la-poste, r&d, thales
So the issue appears to be in UI/API aggregation/display logic, not in the config/seeding.

Hypothesis

The UI (or backend) likely picks the first relation found, or defaults to member when it exists, without applying role precedence.

Suggested fix
When building the displayed role for (user, team):

collect all relations for that (user, team) pair
apply precedence (owner > manager > member)
display only the highest role

Acceptance criteria

Alice is displayed as owner on la-poste
Alice is displayed as manager on thales
Bob / Phil remain member on their teams when no higher role is defined

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions