mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 09:13:02 +03:00
[PR #34] [MERGED] Implement request guards for organization #3904
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/34
Author: @mprasil
Created: 5/30/2018
Status: ✅ Merged
Merged: 5/30/2018
Merged by: @dani-garcia
Base:
master← Head:organization_guards📝 Commits (1)
4d50014Implement 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,AdminHeadersandOwnerHeaders, which are drop-in replacements forHeaders, that also check appropriateOrganizationaccess level.I've updated all appropriate organization
GEThandlers 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.