/** * Responds to a request for issue labels of the specified project. * * <p>This method is used when put a label on an issue and list labels in issue list page. * * <p>Returns 403 Forbidden if the user has no permission to access to the project. * * @param ownerName the name of a project owner * @param projectName the name of a project * @return the response to the request for issue labels */ @IsAllowed(Operation.READ) public static Result labels(String ownerName, String projectName) { if (HttpUtil.isPJAXRequest(request())) { return labelsAsPjax(ownerName, projectName); } return labelsAsJSON(ownerName, projectName); }