Add config for USER query history visibility#940
Conversation
82a8e65 to
c4d5fdb
Compare
025c4b1 to
e787749
Compare
|
@Chaho12 thanks for the feedback, I think I addressed all comments. |
e787749 to
de2a97c
Compare
|
This pull request has gone a while without any activity. Ask for help on #trino-gateway-dev on Trino slack. |
|
Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time. |
| } | ||
|
|
||
| @JsonProperty | ||
| public boolean isUserRoleAllowedToViewAllQueryHistory() |
There was a problem hiding this comment.
Have you tested this value with non-default value, true?
@JsonProperty on isUserRoleAllowedToViewAllQueryHistory() strips the is prefix → JSON key becomes userRoleAllowedToViewAllQueryHistory, which is different than config (allowUserRoleToViewAllQueryHistory: false) mentioned in installation.md
| public class UIConfiguration | ||
| { | ||
| private List<String> disablePages; | ||
| private boolean isUserRoleAllowedToViewAllQueryHistory; |
There was a problem hiding this comment.
This prefix is is repeated; and the setter parameter isUserRoleAllowedToViewAllQueryHistory
reuses it. Java/Jackson convention is to name the field without is-prefix and only use it on the getter
private boolean xxx;
public boolean isXxx();
public void setXxx(boolean xxx);
There was a problem hiding this comment.
How about a test for admin + flag enabled, similar to testUseProvidedUserFilterWhenUserIsAdmin
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| getUIConfiguration() |
There was a problem hiding this comment.
Btw, duplicate fetch (layout.tsx also calls it).
Description
Add a new optional config under
uiConfiguration:allowUserRoleToViewAllQueryHistory(default: false)Behavior:
false: keep existing behavior,USERrole can only see own query history.true: allowUSERrole to view query history across users.ADMINrole behavior is unchanged.Motivation: some deployments need non-admin operators/support users to have full query visibility without granting full admin access.
Additional context and related issues
Changes included:
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required, with the following suggested text: