[PR #1242] [MERGED] Adding Manager Role support #3474

Open
opened 2025-10-09 18:24:04 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/1242
Author: @BlackDex
Created: 11/28/2020
Status: Merged
Merged: 12/8/2020
Merged by: @dani-garcia

Base: masterHead: allow-manager-role


📝 Commits (1)

  • 7cf8809 Adding Manager Role support

📊 Changes

2 files changed (+153 additions, -11 deletions)

View changed files

📝 src/api/core/organizations.rs (+23 -10)
📝 src/auth.rs (+130 -1)

📄 Description

This has been requested a few times (#1136 & #246 & forum), and there already were two
(1:1 duplicate) PR's (#1222 & #1223) which needed some changes and no
followups or further comments unfortunally.

This PR adds two auth headers.

  • ManagerHeaders
    Checks if the user-type is Manager or higher and if the manager is
    part of that collection or not.
  • ManagerHeadersLoose
    Check if the user-type is Manager or higher, but does not check if the
    user is part of the collection, needed for a few features like
    retreiving all the users of an org.

I think this is the safest way to implement this instead of having to
check this within every function which needs this manually.

Also some extra checks if a manager has access to all collections or
just a selection.

fixes #1136


🔄 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/1242 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 11/28/2020 **Status:** ✅ Merged **Merged:** 12/8/2020 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `allow-manager-role` --- ### 📝 Commits (1) - [`7cf8809`](https://github.com/dani-garcia/vaultwarden/commit/7cf8809d777cd88ad5aa932324e51561724e3c32) Adding Manager Role support ### 📊 Changes **2 files changed** (+153 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/organizations.rs` (+23 -10) 📝 `src/auth.rs` (+130 -1) </details> ### 📄 Description This has been requested a few times (#1136 & #246 & forum), and there already were two (1:1 duplicate) PR's (#1222 & #1223) which needed some changes and no followups or further comments unfortunally. This PR adds two auth headers. - ManagerHeaders Checks if the user-type is Manager or higher and if the manager is part of that collection or not. - ManagerHeadersLoose Check if the user-type is Manager or higher, but does not check if the user is part of the collection, needed for a few features like retreiving all the users of an org. I think this is the safest way to implement this instead of having to check this within every function which needs this manually. Also some extra checks if a manager has access to all collections or just a selection. fixes #1136 --- <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:24:04 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3474