Description
The two-argument findSubject(id, source) ignores the source.
groovy:000> findSubject("grouper-wsuser", "INVALID_SOURCE")
|
===> Subject id: grouper-wsuser, sourceId: jdbc, name: grouper-wsuser
|
It needs a middle argument in order to work.
groovy:000> findSubject("grouper-wsuser", null, "INVALID_SOURCE")
|
ERROR edu.internet2.middleware.subject.SourceUnavailableException:
|
Cant find source with id: 'INVALID_SOURCE', Possible source id's: 'g:isa', 'g:gsa', 'grouperEntities', 'grouperExternal', 'jndi', 'jdbc',
|
|
groovy:000> s = findSubject("grouper-wsuser", null, "jdbc")
|
===> Subject id: grouper-wsuser, sourceId: jdbc, name: grouper-wsuser
|
The middle value per groovysh.profile is supposed to be type. But it's ignored because there is no 3-argument findUser java method. There is only a 2-argument method, and the second argument is source.
groovy:000> s = findSubject("grouper-wsuser", "person", "jdbc")
|
===> Subject id: grouper-wsuser, sourceId: jdbc, name: grouper-wsuser
|
groovy:000> s = findSubject("grouper-wsuser", "INVALID_TYPE", "jdbc")
|
===> Subject id: grouper-wsuser, sourceId: jdbc, name: grouper-wsuser
|
|
groovy:000> s.type
|
===> person
|