[
https://issues.apache.org/jira/browse/DRILL-5887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16214463#comment-16214463
]
ASF GitHub Bot commented on DRILL-5887:
---------------------------------------
Github user prasadns14 commented on a diff in the pull request:
https://github.com/apache/drill/pull/998#discussion_r146145515
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java
---
@@ -85,19 +86,24 @@ public ClusterInfo getClusterInfoJSON() {
// For all other cases the user info need-not or should-not be
displayed
OptionManager optionManager = work.getContext().getOptionManager();
final boolean isUserLoggedIn = AuthDynamicFeature.isUserLoggedIn(sc);
- String adminUsers = isUserLoggedIn ?
-
ExecConstants.ADMIN_USERS_VALIDATOR.getAdminUsers(optionManager) : null;
- String adminUserGroups = isUserLoggedIn ?
-
ExecConstants.ADMIN_USER_GROUPS_VALIDATOR.getAdminUserGroups(optionManager) :
null;
+ final String processUser = ImpersonationUtil.getProcessUserName();
+ final String processUserGroups = Joiner.on(",
").join(ImpersonationUtil.getProcessUserGroupNames());
+ String adminUsers =
ExecConstants.ADMIN_USERS_VALIDATOR.getAdminUsers(optionManager);
+ String adminUserGroups =
ExecConstants.ADMIN_USER_GROUPS_VALIDATOR.getAdminUserGroups(optionManager);
// separate groups by comma + space
- if (adminUsers != null) {
+ if (adminUsers.length() == 0) {
--- End diff --
@arina-ielchiieva Thanks for the suggestion.
Any particular reason to move these manipulations to freemarker? Do we have
any advantage moving this if block over to freemarker?
> Display process user/ groups in Drill UI
> ----------------------------------------
>
> Key: DRILL-5887
> URL: https://issues.apache.org/jira/browse/DRILL-5887
> Project: Apache Drill
> Issue Type: Bug
> Components: Client - HTTP
> Affects Versions: 1.11.0
> Reporter: Prasad Nagaraj Subramanya
> Assignee: Prasad Nagaraj Subramanya
> Priority: Minor
> Fix For: 1.12.0
>
>
> Drill UI only lists admin user/ groups specified as options
> We should display the process user/ groups who have admin privilege
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)