Commits

Frank Febbraro committed 72a5d35

Updated to supprot both JIRA's older version of the Crowd REST API and Crowd's newer version

Comments (0)

Files changed (1)

lib/passport-atlassian-crowd/strategy.js

             var resultObject = JSON.parse(result);
             var groups = [];
             resultObject.groups.forEach(function (group) {
+              // JIRA uses an older version of the Crowd REST API
+              if (group.GroupEntity) {
+                groups.push(group.GroupEntity.name);
+              }
+              else {
                 groups.push(group.name);
+              }
             });
 
             return groups;