internal/directory: use both id and name for group (#1086)

Fixes #1085
This commit is contained in:
Cuong Manh Le 2020-07-17 00:15:11 +07:00 committed by GitHub
parent 96424dac0f
commit ee1f9093ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 59 additions and 49 deletions

View file

@ -121,7 +121,7 @@ func (p *Provider) UserGroups(ctx context.Context) ([]*directory.User, error) {
for userID, groupIDs := range userIDToGroupIDs {
for _, groupID := range groupIDs {
if groupName, ok := groupIDToName[groupID]; ok {
userIDToGroupNames[userID] = append(userIDToGroupNames[userID], groupName)
userIDToGroupNames[userID] = append(userIDToGroupNames[userID], strconv.Itoa(groupID), groupName)
} else {
userIDToGroupNames[userID] = append(userIDToGroupNames[userID], "NOGROUP")
}