@Path("{principal-type}/{principal-name}/roles") @GET public void listRoles(HttpRequest httpRequest, HttpResponder httpResponder, @PathParam("principal-type") String principalType, @PathParam("principal-name") String principalName) throws Exception { ensureSecurityEnabled(); Principal principal = new Principal(principalName, Principal.PrincipalType.valueOf(principalType.toUpperCase())); httpResponder.sendJson(HttpResponseStatus.OK, GSON.toJson(authorizer.listRoles(principal))); createLogEntry(httpRequest, HttpResponseStatus.OK); }
@Path("{principal-type}/{principal-name}/roles") @GET public void listRoles(HttpRequest httpRequest, HttpResponder httpResponder, @PathParam("principal-type") String principalType, @PathParam("principal-name") String principalName) throws Exception { ensureSecurityEnabled(); Principal principal = new Principal(principalName, Principal.PrincipalType.valueOf(principalType.toUpperCase())); httpResponder.sendJson(HttpResponseStatus.OK, GSON.toJson(authorizer.listRoles(principal))); createLogEntry(httpRequest, HttpResponseStatus.OK); }