vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 0a72c4b6db4e254d7579b8dc3bb6e9e3c067947d
parent 8867626de898bb8416ed8319806b1c220d57dcb1
Author: Miroslav Prasil <miroslav@prasil.info>
Date:   Sun, 16 Feb 2020 15:01:07 +0000

Do not disable invitations via admin API

This was brought up today:

https://github.com/dani-garcia/bitwarden_rs/issues/752#issuecomment-586715073

I don't think it makes much sense in checking whether admin has the
right to send invitation as admin can change the setting anyway.

Removing the condition allows users to forbid regular users from
inviting new users to server while still preserving the option to do so
via the admin API.

Diffstat:
Msrc/api/admin.rs | 4----
1 file changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/api/admin.rs b/src/api/admin.rs @@ -153,10 +153,6 @@ fn invite_user(data: Json<InviteData>, _token: AdminToken, conn: DbConn) -> Empt err!("User already exists") } - if !CONFIG.invitations_allowed() { - err!("Invitations are not allowed") - } - let mut user = User::new(email); user.save(&conn)?;