Truncate access review roles with badge list
Long role strings in the access review table broke row layout when drivers joined many roles into one comma-separated value. Expose roles as a string array in GraphQL by splitting the stored role at the API layer, and render the first three roles as badges with a "+X more" popover for the rest. Closes ENG-459. Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
@@ -144,11 +144,11 @@ func (d *GoogleWorkspaceDriver) ListAccounts(ctx context.Context) ([]AccountReco
|
||||
|
||||
switch {
|
||||
case u.IsAdmin:
|
||||
rec.Role = "Super Admin"
|
||||
rec.Roles = []string{"Super Admin"}
|
||||
case u.IsDelegatedAdmin:
|
||||
rec.Role = "Delegated Admin"
|
||||
rec.Roles = []string{"Delegated Admin"}
|
||||
default:
|
||||
rec.Role = "User"
|
||||
rec.Roles = []string{"User"}
|
||||
}
|
||||
|
||||
records = append(records, rec)
|
||||
|
||||
Reference in New Issue
Block a user