mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 01:10:09 +03:00
[PR #1242] [MERGED] Adding Manager Role support #3474
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:allow-manager-role📝 Commits (1)
7cf8809Adding 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.
Checks if the user-type is Manager or higher and if the manager is
part of that collection or not.
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.