Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-22 05:10:29 +01:00
Merge pull request #3606 from farodin91/add-group-import-on-invite
Add group import on invite
Dieser Commit ist enthalten in:
Commit
550794b127
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
|
@ -849,6 +849,7 @@ struct CollectionData {
|
|||
#[allow(non_snake_case)]
|
||||
struct InviteData {
|
||||
Emails: Vec<String>,
|
||||
Groups: Vec<String>,
|
||||
Type: NumberOrString,
|
||||
Collections: Option<Vec<CollectionData>>,
|
||||
AccessAll: Option<bool>,
|
||||
|
@ -928,6 +929,11 @@ async fn send_invite(
|
|||
|
||||
new_user.save(&mut conn).await?;
|
||||
|
||||
for group in data.Groups.iter() {
|
||||
let mut group_entry = GroupUser::new(String::from(group), user.uuid.clone());
|
||||
group_entry.save(&mut conn).await?;
|
||||
}
|
||||
|
||||
log_event(
|
||||
EventType::OrganizationUserInvited as i32,
|
||||
&new_user.uuid,
|
||||
|
|
Laden …
In neuem Issue referenzieren