String name = project.getName();
int projectId = Integer.parseInt(project.getId());
List<RoleId> roles = Lists.newArrayList();
for (Role role : project.getRoles()) {
roles.add(new RoleId(role.getName()));
}
CryptoKey projectSecret = FathomdbCrypto.deserializeKey(project.getSecret());
return new PlatformlayerProjectAuthorization(user, name, projectSecret, roles, projectId);
}