コード例 #1
0
 /** @inheritDoc */
 @Override
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(getClass().getSimpleName());
   sb.append("::uid=");
   sb.append(getUid());
   Person person = findPerson();
   if (person != null) {
     sb.append(" authId=");
     sb.append(person.getAuthId());
   }
   return sb.toString();
 }
コード例 #2
0
 /**
  * Sets the person to associate with this member.
  *
  * @param person
  */
 void setPerson(Person person) {
   if (person == null) {
     throw new IllegalArgumentException();
   }
   this.person = person;
   setUid(person.getUid());
 }
コード例 #3
0
  /** @inheritDoc */
  public FilterResult checkEligibility(Person person, FilterChain filterChain) throws Exception {

    if (!Collections.disjoint(person.getGroupMemberships(), eligibleGroupMemberships)) {
      return new FilterResult(true, "has membership in eligible group");
    } else {
      return filterChain.checkEligibility(person);
    }
  }