Factor out the hasMembership method from checkMembership
This makes it possible for the document picker to reuse it.
Patch by: Sverre Rabbelier
A list of bugs is available in the Google App Engine SDK project on Google Code.The issue tracker is at http://code.google.com/p/googleappengine/issues/.