From 681135e98cf03ef17845b9d91b9d0110b6ed3597 Mon Sep 17 00:00:00 2001 From: Darran Lofthouse Date: Thu, 18 Aug 2022 11:16:31 +0100 Subject: [PATCH] Resolves #265 Pass in a HttpMethod to the call to hasAccessToWebResource(). --- .../src/main/java/ee/jakarta/tck/security/test/Servlet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tck/app-securitycontext/src/main/java/ee/jakarta/tck/security/test/Servlet.java b/tck/app-securitycontext/src/main/java/ee/jakarta/tck/security/test/Servlet.java index 13736f7..d3f1aa1 100644 --- a/tck/app-securitycontext/src/main/java/ee/jakarta/tck/security/test/Servlet.java +++ b/tck/app-securitycontext/src/main/java/ee/jakarta/tck/security/test/Servlet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -82,7 +82,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro response.getWriter().write("context user has role \"bar\": " + securityContext.isCallerInRole("bar") + "\n"); response.getWriter().write("context user has role \"kaz\": " + securityContext.isCallerInRole("kaz") + "\n"); - response.getWriter().write("has access to /protectedServlet: " + securityContext.hasAccessToWebResource("/protectedServlet") + "\n"); + response.getWriter().write("has access to /protectedServlet: " + securityContext.hasAccessToWebResource("/protectedServlet", "GET") + "\n"); // This method test a method that was removed from the API, but is present in the RI Set roles = testEJB.getAllDeclaredCallerRoles();