vyommani commented on code in PR #731:
URL: https://github.com/apache/ranger/pull/731#discussion_r2521549044


##########
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java:
##########
@@ -3220,7 +3220,7 @@ void ensureAdminAccess(RangerPolicy policy, String 
grantor) {
         final boolean isAdmin;
         final boolean isKeyAdmin;
 
-        if (StringUtils.isEmpty(grantor)) {
+        if (StringUtils.isNotEmpty(bizUtil.getCurrentUserLoginId())) {

Review Comment:
   The updated code changes the precedence of user selection. Originally, it 
prioritized the granter as the admin user, but now it favors the login user. 
Was this change intentional?
   Also, the else block doesn't check if granter is null or empty. Please add 
this check for consistency.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to