Revision 9709
Added by ben leinfelder over 8 years ago
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java | ||
---|---|---|
1368 | 1368 |
String[] groupnames = null; |
1369 | 1369 |
if (session != null ) { |
1370 | 1370 |
username = session.getSubject().getValue(); |
1371 |
if (session.getSubjectInfo() != null) { |
|
1372 |
List<Group> groupList = session.getSubjectInfo().getGroupList(); |
|
1373 |
if (groupList != null) { |
|
1374 |
groupnames = new String[groupList.size()]; |
|
1375 |
for (int i = 0; i < groupList.size(); i++ ) { |
|
1376 |
groupnames[i] = groupList.get(i).getSubject().getValue(); |
|
1377 |
} |
|
1378 |
} |
|
1371 |
Set<Subject> otherSubjects = AuthUtils.authorizedClientSubjects(session); |
|
1372 |
if (otherSubjects != null) { |
|
1373 |
groupnames = new String[otherSubjects.size()]; |
|
1374 |
int i = 0; |
|
1375 |
Iterator<Subject> iter = otherSubjects.iterator(); |
|
1376 |
while (iter.hasNext()) { |
|
1377 |
groupnames[i] = iter.next().getValue(); |
|
1378 |
i++; |
|
1379 |
} |
|
1379 | 1380 |
} |
1380 | 1381 |
} |
1381 | 1382 |
|
Also available in: Unified diff
merge from 2.6 branch: use AuthUtils to gather user group subjects