[PR #2698] [MERGED] Add Org user revoke feature #3130

Closed
opened 2026-03-03 09:26:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/2698
Author: @BlackDex
Created: 8/20/2022
Status: Merged
Merged: 9/4/2022
Merged by: @dani-garcia

Base: mainHead: org-user-revoke-access


📝 Commits (1)

  • 1722742 Add Org user revoke feature

📊 Changes

9 files changed (+487 additions, -149 deletions)

View changed files

📝 src/api/admin.rs (+16 -5)
📝 src/api/core/ciphers.rs (+1 -1)
📝 src/api/core/emergency_access.rs (+3 -3)
📝 src/api/core/organizations.rs (+238 -80)
📝 src/api/core/sends.rs (+3 -2)
📝 src/db/models/mod.rs (+1 -1)
📝 src/db/models/org_policy.rs (+125 -25)
📝 src/db/models/organization.rs (+95 -27)
📝 src/db/models/user.rs (+5 -5)

📄 Description

This PR adds a the new v2022.8.x revoke feature which allows an
organization owner or admin to revoke access for one or more users.

This PR also fixes several permissions and policy checks which were faulty.

  • Modified some functions to use DB Count features instead of iter/count aftwards.
  • Rearanged some if statements (faster matching or just one if instead of nested if's)
  • Added and fixed several policy checks where needed
  • Some small updates on some response models
  • Made some functions require an enum instead of an i32

NOTE:
Please look at this PR carefully, I think i have done all the tests regarding the changed policy validation. But I could have missed a situation of course.

Also this PR is needed to use the v2022.8.x version of the web-vault: https://github.com/dani-garcia/bw_web_builds/pull/77


🔄 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/2698 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 8/20/2022 **Status:** ✅ Merged **Merged:** 9/4/2022 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `org-user-revoke-access` --- ### 📝 Commits (1) - [`1722742`](https://github.com/dani-garcia/vaultwarden/commit/1722742ab3637cbe46d3527f1c63533a23719fa7) Add Org user revoke feature ### 📊 Changes **9 files changed** (+487 additions, -149 deletions) <details> <summary>View changed files</summary> 📝 `src/api/admin.rs` (+16 -5) 📝 `src/api/core/ciphers.rs` (+1 -1) 📝 `src/api/core/emergency_access.rs` (+3 -3) 📝 `src/api/core/organizations.rs` (+238 -80) 📝 `src/api/core/sends.rs` (+3 -2) 📝 `src/db/models/mod.rs` (+1 -1) 📝 `src/db/models/org_policy.rs` (+125 -25) 📝 `src/db/models/organization.rs` (+95 -27) 📝 `src/db/models/user.rs` (+5 -5) </details> ### 📄 Description This PR adds a the new v2022.8.x revoke feature which allows an organization owner or admin to revoke access for one or more users. This PR also fixes several permissions and policy checks which were faulty. - Modified some functions to use DB Count features instead of iter/count aftwards. - Rearanged some if statements (faster matching or just one if instead of nested if's) - Added and fixed several policy checks where needed - Some small updates on some response models - Made some functions require an enum instead of an i32 **NOTE:** Please look at this PR carefully, I think i have done all the tests regarding the changed policy validation. But I could have missed a situation of course. Also this PR is needed to use the v2022.8.x version of the web-vault: https://github.com/dani-garcia/bw_web_builds/pull/77 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 09:26:00 +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/vaultwarden#3130
No description provided.