-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: url preview should contain auth params #7509
Conversation
@@ -33,24 +33,38 @@ interface Props { | |||
|
|||
const defaultPreview = '...'; | |||
|
|||
function getQueryParamsFromAuth(auth: RequestAuthentication | {}): RequestParameter[] { | |||
if (!('type' in auth)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!auth.type) {}
seems easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built a helper for this getAuthObjectOrNull
if this equals null that means auth is not set or empty object or doesn't have .type I've made a suggestion for the change but please test it to confirm. These cases are all possible because request groups can have auth objects but existing ones are uninitialised and therefore undefined. In this case it shouldn't show so perhaps you don't need it.
if (!('type' in auth)) { | |
if (getAuthObjectOrNull(auth) === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let me also test this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also should preview auth fields coming from folders above
016d58b
to
02205c0
Compare
Changes:
Closes: #7235
Ref: INS-3966