This is an automated email from the ASF dual-hosted git repository.

jmclean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new efdd312990 Fix malformed multi-role names in group revoke error 
handling (#10322)
efdd312990 is described below

commit efdd31299027247803eebcdb3fa89087ba45dd64
Author: Aditi102005 <[email protected]>
AuthorDate: Wed Apr 8 11:43:20 2026 +0530

    Fix malformed multi-role names in group revoke error handling (#10322)
    
    ### What changes were proposed in this pull request?
    
    This PR fixes malformed role names in the error handling of the
    `revokeRolesFromGroup` operation.
    
    Previously, the code used:
    
    `StringUtils.join(request.getRoleNames())`
    
    which concatenated role names without any delimiter. For example:
    
    role1role2
    
    This PR updates the code to include a comma delimiter:
    
    `StringUtils.join(request.getRoleNames(), ",")`
    
    which produces a readable output such as:
    
    role1,role2
    
    ### Why are the changes needed?
    
    This improves the readability of error messages when multiple roles
    are involved and keeps the behavior consistent with the existing
    `revokeRolesFromUser` implementation.
    
    ### Does this PR introduce any user-facing change?
    
    No functional change. This only improves error message formatting.
    
    ### Related Issue
    
    Fixes #10222
---
 .../java/org/apache/gravitino/server/web/rest/PermissionOperations.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/server/src/main/java/org/apache/gravitino/server/web/rest/PermissionOperations.java
 
b/server/src/main/java/org/apache/gravitino/server/web/rest/PermissionOperations.java
index 51337850f8..e7a4eeb54b 100644
--- 
a/server/src/main/java/org/apache/gravitino/server/web/rest/PermissionOperations.java
+++ 
b/server/src/main/java/org/apache/gravitino/server/web/rest/PermissionOperations.java
@@ -189,7 +189,7 @@ public class PermissionOperations {
           });
     } catch (Exception e) {
       return ExceptionHandlers.handleGroupPermissionOperationException(
-          OperationType.REVOKE, StringUtils.join(request.getRoleNames()), 
group, e);
+          OperationType.REVOKE, StringUtils.join(request.getRoleNames(), ","), 
group, e);
     }
   }
 

Reply via email to