mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-12 01:45:56 -05:00
[PR #2795] [CLOSED] automatically purge stale invitations #6791
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/2795
Author: @stefan0xC
Created: 10/4/2022
Status: ❌ Closed
Base:
main← Head:automatically-expire-invitations📝 Commits (1)
4aceff4automatically purge stale invitations📊 Changes
9 files changed (+89 additions, -3 deletions)
View changed files
📝
.env.template(+7 -0)📝
src/api/core/accounts.rs(+10 -1)📝
src/api/core/mod.rs(+1 -0)📝
src/api/mod.rs(+1 -0)📝
src/auth.rs(+16 -2)📝
src/config.rs(+5 -0)📝
src/db/models/organization.rs(+9 -0)📝
src/db/models/user.rs(+33 -0)📝
src/main.rs(+7 -0)📄 Description
Fixes part of #2792 by automatically deleting invited users that have not registered before the expiration date.
INVITATION_EXPIRATION_HOURSdefaults to 120 (5 days) because that was the default expiration date of the Invite JWT. When set to 0 the expiration date is not checked.Also no invitation is deleted when mail is disabled.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.