@Path("{token: [0-9a-fA-F]{32} }/status/cluster") // 128 bit md5 sums
public StorageClusterStatusResource getClusterStatusResourceAuthorized(
final @PathParam("token") String token) throws IOException {
if (servlet.isMultiUser()) {
User user = auth(token);
if (user != null && user.isAdmin()) {
return new StorageClusterStatusResource(user);
}
throw new WebApplicationException(Response.Status.FORBIDDEN);
}
throw new WebApplicationException(Response.Status.BAD_REQUEST);