// locate first matching subject and attach.
SubjectCriteria subjectCriteria = new SubjectCriteria();
subjectCriteria.setCaseSensitive(false);
subjectCriteria.setStrict(true);
subjectCriteria.fetchRoles(false);
subjectCriteria.fetchConfiguration(false);
subjectCriteria.addFilterName(subject.getName());
//BZ-798465: spinder 3/1/12 we now need to pass in overlord because of BZ-786159
// We've verified that this user has valid session, and is using ldap. Safe to elevate search here.
PageList<Subject> subjectsLocated = findSubjectsByCriteria(getOverlord(), subjectCriteria);
//if subject variants located then take the first one with a principal otherwise do nothing