@PathParam("user") final String user) {
RestResponseBuilder response = RestResponseBuilder.forRequest(request);
if (!request.isUserInRole(SecurityService.ADMIN_ROLE)) {
return response.status(Response.Status.FORBIDDEN).build();
}
response.body(new RestResponseBuilder.BodyGenerator() {
@Override
public void write(PrintWriter writer) throws Exception {
try (Session session = reqs.sessionService.createSession()) {
reqs.dxlService.ddlFunctions().dropSchema(session, user);
reqs.securityService.deleteUser(user);