-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat: collection level headers and authorization #3505
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
Conversation
84e5b02
to
70ab963
Compare
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.
-
The modal is not displayed, and a few exceptions get logged to the console while attempting to import a collection that follows the old format (without authorization and headers set at the root level).
old-collections-format-exception.mov
-
The collection entries synced to the personal workspace from local storage added while logged out do not persist. For instance, deleting any of them while being logged out affects the one in the personal workspace.
personal-workspace-collections-affected-by-unauth-state.mov
-
Authorization and headers set at the collection level go to the default state while importing collections into the team workspace.
inconsistent-sate-collections-logged-in.mov
-
There are exceptions thrown in the UI under headers while opting for the API key as the Authorization type and choosing the values to be supplied via headers. There is a similar issue that already exists for the request
Authorization/Headers
tabs, Ref. This might be happening since common components are involved. Please confirm.ui-exceptions-pass-by-headers.mov
-
Is it intentional that the default
Authorization type
for a request not belonging to a collection isinherit
? Shouldn't we keep the default type ofNone
for those requests?default-auth-type-non-collection-request.mov
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.
REST & GQL collections could not inherit from the ancestor levels and default to the authorization type of None
.
rest-collections-ancestor-inherit.mov
Also, can you look into the failing tests?
0565660
to
292e664
Compare
packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts
Show resolved
Hide resolved
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.
-
The currently active tab (REST & GQL) doesn't reflect changes made at the ancestor level. This applies to both headers and authorization.
Screen.Recording.2023-12-13.at.1.07.18.PM.mov
-
The modal is not displayed while importing GQL collections that follow the old format (without auth & headers) and there are errors logged to the console.
d09fa1e
to
891824f
Compare
0ecb7c5
to
fa8c7a9
Compare
Closes HFE-238 HFE-348 HFE-331 HFE-330 #2259 #1741
Description
This PR adds ability to set authorization & headers in collection and folder level which their requests can inherit.
The children request can either inherit the parent collection authorization or headers
The request authorization has a new option 'inherit' where the auth is inherited from their parent collection/folder if selected.
The authorizatiuon priority is like this
The auth set in request > Parent Folder > Root Colection
The header are can be inherited from the entire tree ie,
The request has the ability to overide the following headers
Checks
Additional information
TODO