fimugdha commented on code in PR #1394:
URL: https://github.com/apache/ranger/pull/1394#discussion_r4708228709


##########
security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java:
##########
@@ -2626,17 +2624,19 @@ public List<RangerPrincipal> 
getRangerPrincipals(SearchCriteria searchCriteria)
     public boolean hasAccessToModule(String moduleName) {
         UserSessionBase userSession = ContextUtil.getCurrentUserSession();
 
-        if (userSession != null && userSession.isSuperUser()) {
-            return true;
-        }
-
-        if (userSession != null && userSession.getLoginId() != null) {
-            VXUser vxUser = 
xUserService.getXUserByUserName(userSession.getLoginId());
+        if (userSession != null) {
+            if (RangerConstants.MODULE_KEY_MANAGER.equals(moduleName)) {
+                return userSession.isKeyAdmin() || 
userSession.isAuditKeyAdmin();

Review Comment:
   Could you please help clarify the intention behind explicitly adding a check 
for MODULE_KEY_MANAGER in this function ?



-- 
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