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:
@@ -90,10 +90,17 @@ func (d *DocuSignDriver) ListAccounts(ctx context.Context) ([]AccountRecord, err
|
||||
}
|
||||
|
||||
for _, u := range resp.Users {
|
||||
role := strings.TrimSpace(u.PermissionProfileName)
|
||||
|
||||
roles := []string{}
|
||||
if role != "" {
|
||||
roles = []string{role}
|
||||
}
|
||||
|
||||
record := AccountRecord{
|
||||
Email: u.Email,
|
||||
FullName: u.UserName,
|
||||
Role: u.PermissionProfileName,
|
||||
Roles: roles,
|
||||
JobTitle: u.JobTitle,
|
||||
Active: new(strings.EqualFold(u.UserStatus, "active")),
|
||||
IsAdmin: strings.EqualFold(u.IsAdmin, "True"),
|
||||
|
||||
Reference in New Issue
Block a user