async fn edit_gated_cipher<R: Repository<Cipher> + ?Sized>(
key_store: &KeyStore<KeySlotIds>,
api_client: &ApiClient,
repository: &R,
encrypted_for: UserId,
request: CipherEditRequest,
original_cipher_view: CipherView,
use_strict_decryption: bool,
use_blob: bool,
) -> Result<CipherView, EditCipherError>Expand description
Edit a PAM-gated cipher against a full original supplied by the caller.
edit_cipher reads its original out of the repository, which for a gated cipher only ever
holds the partial copy. This path takes the full view the caller obtained from a
lease-authorised single-cipher read instead, so password history carries forward correctly.
It mirrors the admin edit path, which takes its original as an argument for the same reason:
no usable copy exists in local state.