[PR #34] [MERGED] Implement request guards for organization #3904

Closed
opened 2025-10-09 18:32:21 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/34
Author: @mprasil
Created: 5/30/2018
Status: Merged
Merged: 5/30/2018
Merged by: @dani-garcia

Base: masterHead: organization_guards


📝 Commits (1)

  • 4d50014 Implement request guards for organization

📊 Changes

2 files changed (+108 additions, -18 deletions)

View changed files

📝 src/api/core/organizations.rs (+7 -17)
📝 src/auth.rs (+101 -1)

📄 Description

This implements OrgHeaders, AdminHeaders and OwnerHeaders, which are drop-in replacements for Headers, that also check appropriate Organization access level.

I've updated all appropriate organization GET handlers with the above to show the usage. The other handlers should be updated as well, but these will require removing some unnecessary check code and I wanted to keep this PR as minimal as possible, so I'd rather leave that for another, separate PR.

This should resolve #33


🔄 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/dani-garcia/vaultwarden/pull/34 **Author:** [@mprasil](https://github.com/mprasil) **Created:** 5/30/2018 **Status:** ✅ Merged **Merged:** 5/30/2018 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `organization_guards` --- ### 📝 Commits (1) - [`4d50014`](https://github.com/dani-garcia/vaultwarden/commit/4d50014e355d806c6b13ef349899ad1546db0982) Implement request guards for organization ### 📊 Changes **2 files changed** (+108 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/organizations.rs` (+7 -17) 📝 `src/auth.rs` (+101 -1) </details> ### 📄 Description This implements `OrgHeaders`, `AdminHeaders` and `OwnerHeaders`, which are drop-in replacements for `Headers`, that also check appropriate `Organization` access level. I've updated all appropriate organization `GET` handlers with the above to show the usage. The other handlers should be updated as well, but these will require removing some unnecessary check code and I wanted to keep this PR as minimal as possible, so I'd rather leave that for another, separate PR. This should resolve #33 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-09 18:32:21 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3904