FsBucket bucket;
if (!isAuthenticated()) {
// Check for a public file
String projectName = getProjectName();
Project project = new Project(Long.valueOf(projectName));
bucket = fs.findBucket(user, project, bucketName);
} else {
user = getAuth().getUser();
bucket = fs.findBucket(user, getProject(), bucketName);
}