geforkt von mirrored/vaultwarden
Fix folder notifications, enable template strict mode and add missing option to env template
Dieser Commit ist enthalten in:
Ursprung
0e4a746eeb
Commit
4bf32af60e
3 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen
|
@ -23,6 +23,9 @@
|
||||||
# WEB_VAULT_FOLDER=web-vault/
|
# WEB_VAULT_FOLDER=web-vault/
|
||||||
# WEB_VAULT_ENABLED=true
|
# WEB_VAULT_ENABLED=true
|
||||||
|
|
||||||
|
## Enables websocket notifications
|
||||||
|
# WEBSOCKET_ENABLED=false
|
||||||
|
|
||||||
## Controls the WebSocket server address and port
|
## Controls the WebSocket server address and port
|
||||||
# WEBSOCKET_ADDRESS=0.0.0.0
|
# WEBSOCKET_ADDRESS=0.0.0.0
|
||||||
# WEBSOCKET_PORT=3012
|
# WEBSOCKET_PORT=3012
|
||||||
|
|
|
@ -299,11 +299,12 @@ pub fn update_cipher_from_data(
|
||||||
cipher.data = type_data.to_string();
|
cipher.data = type_data.to_string();
|
||||||
cipher.password_history = data.PasswordHistory.map(|f| f.to_string());
|
cipher.password_history = data.PasswordHistory.map(|f| f.to_string());
|
||||||
|
|
||||||
|
cipher.move_to_folder(data.FolderId, &headers.user.uuid, &conn)?;
|
||||||
cipher.save(&conn)?;
|
cipher.save(&conn)?;
|
||||||
|
|
||||||
nt.send_cipher_update(ut, &cipher, &cipher.update_users_revision(&conn));
|
nt.send_cipher_update(ut, &cipher, &cipher.update_users_revision(&conn));
|
||||||
|
|
||||||
cipher.move_to_folder(data.FolderId, &headers.user.uuid, &conn)
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
use super::folders::FolderData;
|
use super::folders::FolderData;
|
||||||
|
@ -884,7 +885,7 @@ fn delete_all(data: JsonUpcase<PasswordData>, headers: Headers, conn: DbConn, nt
|
||||||
// Delete folders
|
// Delete folders
|
||||||
for f in Folder::find_by_user(&user.uuid, &conn) {
|
for f in Folder::find_by_user(&user.uuid, &conn) {
|
||||||
f.delete(&conn)?;
|
f.delete(&conn)?;
|
||||||
nt.send_folder_update(UpdateType::FolderCreate, &f);
|
nt.send_folder_update(UpdateType::FolderDelete, &f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -334,6 +334,8 @@ pub struct Config {
|
||||||
|
|
||||||
fn load_templates(path: String) -> Handlebars {
|
fn load_templates(path: String) -> Handlebars {
|
||||||
let mut hb = Handlebars::new();
|
let mut hb = Handlebars::new();
|
||||||
|
// Error on missing params
|
||||||
|
hb.set_strict_mode(true);
|
||||||
|
|
||||||
macro_rules! reg {
|
macro_rules! reg {
|
||||||
($name:expr) => {
|
($name:expr) => {
|
||||||
|
|
Laden …
In neuem Issue referenzieren