1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-25 12:13:19 +00:00

Fix BWDC when re-run with cleared cache

Using the BWDC with a cleared cache caused invited users to be converted
to accepted users.

The problem was a wrong check for the `restore` function.

Fixes #4114
This commit is contained in:
BlackDex 2023-12-06 21:56:46 +01:00
commit 56d47d94f7
No known key found for this signature in database
GPG key ID: 58C80A2AA6C765E1

View file

@ -214,7 +214,7 @@ impl UserOrganization {
}
pub fn restore(&mut self) -> bool {
if self.status < UserOrgStatus::Accepted as i32 {
if self.status < UserOrgStatus::Invited as i32 {
self.status += ACTIVATE_REVOKE_DIFF;
return true;
}