diff --git a/server/src/main/java/org/apache/gravitino/server/web/rest/RoleOperations.java b/server/src/main/java/org/apache/gravitino/server/web/rest/RoleOperations.java index f2ed13f7daf..1fa8a443f81 100644 --- a/server/src/main/java/org/apache/gravitino/server/web/rest/RoleOperations.java +++ b/server/src/main/java/org/apache/gravitino/server/web/rest/RoleOperations.java @@ -96,14 +96,12 @@ public Response getRole(@PathParam("metalake") String metalake, @PathParam("role @ResponseMetered(name = "create-role", absolute = true) public Response createRole(@PathParam("metalake") String metalake, RoleCreateRequest request) { try { - - for (SecurableObjectDTO object : request.getSecurableObjects()) { - checkSecurableObject(metalake, object); - } - return Utils.doAs( httpRequest, () -> { + for (SecurableObjectDTO object : request.getSecurableObjects()) { + checkSecurableObject(metalake, object); + } List securableObjects = Arrays.stream(request.getSecurableObjects()) .map(