Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-16 04:12:53 +01:00
Remove check from Invitation:take()
I've checked the spots when `Invitation::new()` and `Invitation::take()` are used and it seems like all spots are already correctly gated. So to enable invitations via admin API even when invitations are otherwise disabled, this check can be removed.
Dieser Commit ist enthalten in:
Ursprung
0a72c4b6db
Commit
03233429f4
1 geänderte Dateien mit 4 neuen und 5 gelöschten Zeilen
|
@ -319,10 +319,9 @@ impl Invitation {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn take(mail: &str, conn: &DbConn) -> bool {
|
pub fn take(mail: &str, conn: &DbConn) -> bool {
|
||||||
CONFIG.invitations_allowed()
|
match Self::find_by_mail(mail, &conn) {
|
||||||
&& match Self::find_by_mail(mail, &conn) {
|
Some(invitation) => invitation.delete(&conn).is_ok(),
|
||||||
Some(invitation) => invitation.delete(&conn).is_ok(),
|
None => false,
|
||||||
None => false,
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Laden …
In neuem Issue referenzieren