if (cfg.enabled) {
if (user == null || "".equals(user))
user = "anonymous";
return createFor(req, db, user);
}
throw new ServiceNotEnabledException();
}
if (user != null && !"".equals(user))
return createFor(req, db, user);
throw new ServiceNotAuthorizedException();