Skip to main content

submit_cipher_edit

Function submit_cipher_edit 

Source
async fn submit_cipher_edit<R: Repository<Cipher> + ?Sized>(
    key_store: &KeyStore<KeySlotIds>,
    api_client: &ApiClient,
    repository: &R,
    encrypted_for: UserId,
    request: CipherEditRequest,
    original_cipher_view: &CipherView,
    stored_cipher: Cipher,
    use_strict_decryption: bool,
    use_blob: bool,
) -> Result<CipherView, EditCipherError>
Expand description

The body both edit paths share: request → view, fold in password history against original_cipher_view, encrypt, PUT, and merge the write-return over stored_cipher before persisting it.

The paths differ only in where the original comes from — local state for edit_cipher, the caller for edit_gated_cipher, because a gated cipher has no full copy in state — so that is all either one is left holding.