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.
🔄 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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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:
main← Head:org-user-revoke-access📝 Commits (1)
1722742Add 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.
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.