[PR #3852] [MERGED] fix: collection level authorization inheritance issue #4560

Closed
opened 2026-03-17 02:05:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3852
Author: @anwarulislam
Created: 2/22/2024
Status: Merged
Merged: 2/23/2024
Merged by: @AndrewBastin

Base: release/2024.3.0Head: fix/collection-level-authorization


📝 Commits (5)

  • 603bcef fix: collection level authorization issue
  • 6cd37f9 fix: test file
  • 9d214dc fix: graphql default auth type set to inherit
  • 59456fe chore: root collection auth enabled
  • 37c1328 chore: authType none for root collection

📊 Changes

8 files changed (+48 additions, -48 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/collections/index.vue (+2 -2)
📝 packages/hoppscotch-common/src/components/graphql/Authorization.vue (+10 -10)
📝 packages/hoppscotch-common/src/components/http/Authorization.vue (+10 -10)
📝 packages/hoppscotch-common/src/helpers/curl/__tests__/curlparser.spec.js (+22 -22)
📝 packages/hoppscotch-common/src/helpers/graphql/default.ts (+1 -1)
📝 packages/hoppscotch-common/src/helpers/rest/default.ts (+1 -1)
📝 packages/hoppscotch-data/src/graphql/index.ts (+1 -1)
📝 packages/hoppscotch-data/src/rest/index.ts (+1 -1)

📄 Description

Closes HFE-422 #3713

Description

This pull request resolves the issue of collection-level authorization inheritance in its requests. Currently, when we create a request in a collection that is supposed to inherit the auth from collection properties, we have to manually choose an auth-type called "inherit" to inherit authorization from the collection.

Although it works when we select the option manually, it should by default inherit the auth options from the collection and prioritize request auth over collection auth without creating or selecting any auth-type called "inherit". This PR addresses the issue and changes the flow to achieve this.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3852 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 2/22/2024 **Status:** ✅ Merged **Merged:** 2/23/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `release/2024.3.0` ← **Head:** `fix/collection-level-authorization` --- ### 📝 Commits (5) - [`603bcef`](https://github.com/hoppscotch/hoppscotch/commit/603bcef4e83021f5cdc2599696c52980e677261a) fix: collection level authorization issue - [`6cd37f9`](https://github.com/hoppscotch/hoppscotch/commit/6cd37f97f422acc8109a0a2b1c60f6e342d88a93) fix: test file - [`9d214dc`](https://github.com/hoppscotch/hoppscotch/commit/9d214dc3204cdda0b62b6e452bdc3202c5f84b70) fix: graphql default auth type set to inherit - [`59456fe`](https://github.com/hoppscotch/hoppscotch/commit/59456fe9e8cfdadecaa3ab0fd1b0cc7c18877e29) chore: root collection auth enabled - [`37c1328`](https://github.com/hoppscotch/hoppscotch/commit/37c1328c0580f1c5de2f8c4a410c3508fdd64d5a) chore: authType none for root collection ### 📊 Changes **8 files changed** (+48 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/collections/index.vue` (+2 -2) 📝 `packages/hoppscotch-common/src/components/graphql/Authorization.vue` (+10 -10) 📝 `packages/hoppscotch-common/src/components/http/Authorization.vue` (+10 -10) 📝 `packages/hoppscotch-common/src/helpers/curl/__tests__/curlparser.spec.js` (+22 -22) 📝 `packages/hoppscotch-common/src/helpers/graphql/default.ts` (+1 -1) 📝 `packages/hoppscotch-common/src/helpers/rest/default.ts` (+1 -1) 📝 `packages/hoppscotch-data/src/graphql/index.ts` (+1 -1) 📝 `packages/hoppscotch-data/src/rest/index.ts` (+1 -1) </details> ### 📄 Description Closes HFE-422 #3713 ### Description This pull request resolves the issue of collection-level authorization inheritance in its requests. Currently, when we create a request in a collection that is supposed to inherit the auth from collection properties, we have to manually choose an auth-type called "inherit" to inherit authorization from the collection. Although it works when we select the option manually, it should by default inherit the auth options from the collection and prioritize request auth over collection auth without creating or selecting any auth-type called "inherit". This PR addresses the issue and changes the flow to achieve this. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:05:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4560
No description provided.