code: func (s *Set) IsMember(c context.Context, id identity.Identity) (bool, error) {
  	if s == nil {
  		return false, nil
  	}
  
  	if s.All {
  		return true, nil
  	}
  
  	if _, ok := s.IDs[id]; ok {
  		return true, nil
  	}
  
  	if len(s.Groups) != 0 {
  		groups := make([]string, 0, len(s.Groups))
  		for gr := range s.Groups {
  			groups = append(groups, gr)
  		}
  		return auth.GetState(c).DB().IsMember(c, id, groups)
  	}
  
  	return false, nil
  }
docs: // IsMember returns true if the given identity is in the set.
  //
  // It looks inside the groups too.
  //
  // 'nil' receiver value is valid and represents an empty set.