Skip to content

Commit

Permalink
Fix for #116. Only LDAPUsers were being counted as team members. Adde…
Browse files Browse the repository at this point in the history
…d the sum of both LDAP and Managed users to the total count.

(cherry picked from commit 9bc916a)
  • Loading branch information
stevespringett committed Mar 29, 2018
1 parent 127d8df commit 1ef5e50
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/webapp/admin/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ function formatTeamTable(res) {
} else {
res[i].apiKeysNum = res[i].apiKeys.length;
}
if (res[i].ldapUsers === undefined) {
res[i].membersNum = 0;
} else {
res[i].membersNum = res[i].ldapUsers.length;

res[i].membersNum = 0;

if (res[i].ldapUsers !== undefined) {
res[i].membersNum += res[i].ldapUsers.length;
}
if (res[i].managedUsers !== undefined) {
res[i].membersNum += res[i].managedUsers.length;
}
}
return res;
Expand Down

0 comments on commit 1ef5e50

Please sign in to comment.