Added inferring author of gallery and photos from request.user.