Use getSpaces with SpacesQuery rather than deprecated getPermittedSpacesForUser