Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Description
Example: Subject has multiple values
subject properties: subjectApi.source.ldap.multivaluedLdapAttributes = edupersonaffiliation
|
|
SubjectFinder.findByIdentifier("banderson", true, true).getAttributeValues("edupersonaffiliation")
|
===> [A, C, D]
|
curl -X GET --basic --user GrouperSystem:pass -H "Content-type: application/json" http://localhost:8080/grouper/servicesRest/v4_9_000/groups/test:testGroup/members --data '
|
{
|
"WsRestGetMembersLiteRequest": {
|
"subjectAttributeNames": "edupersonaffiliation"
|
}
|
}
|
'
|
{
|
"WsGetMembersLiteResult": {
|
"subjectAttributeNames": [
|
"edupersonaffiliation"
|
],
|
"resultMetadata": {
|
"resultCode": "SUCCESS",
|
"resultMessage": "Success for: clientVersion: 4.9.0, wsGroupLookups: Array size: 1: [0]: WsGroupLookup[pitGroups=[],groupName=test:testGroup]\n\n, memberFilter: All, includeSubjectDetail: false, actAsSubject: null, fieldName: null, subjectAttributeNames: Array size: 1: [0]: edupersonaffiliation\n\n, paramNames: \n, params: null\n, sourceIds: null\n, pointInTimeFrom: null, pointInTimeTo: null, pageSize: null, pageNumber: null, sortString: null, ascending: null",
|
"success": "T"
|
},
|
"responseMetadata": {
|
"millis": "12",
|
"serverVersion": "4.12.0"
|
},
|
"wsGroup": {
|
"extension": "testGroup",
|
"typeOfGroup": "group",
|
"displayExtension": "testGroup",
|
"displayName": "test:testGroup",
|
"name": "test:testGroup",
|
"uuid": "27066c7b0f86429680a22913bd023ba3",
|
"idIndex": "1000040",
|
"enabled": "T"
|
},
|
"wsSubjects": [
|
{
|
"resultCode": "SUCCESS",
|
"success": "T",
|
"memberId": "3d80c43964fb4491aa1ccdd27c5028f1",
|
"id": "800001147",
|
"name": "Bob Anderson",
|
"sourceId": "eduLDAP",
|
"attributeValues": [
|
"A"
|
]
|
}
|
]
|
}
|
}
|
I don't know what the right behavior should – whether to string values together, or represent it as an array instead of a string.The workaround is to create a virtual attribute that strings together the values.
The place where the values are set in the object is edu.internet2.middleware.grouper.ws.coresoap.WsSubject#assignSubjectData
//NOTE: dont send nulls, it might mess up XML, only send empty string if not there
|
this.attributeValues[index] = StringUtils.defaultString(subject.getAttributeValue(attributeName));
|