From f31aab3926b197c1be5f3b6d219369b47c55a07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 11 Sep 2026 10:24:59 +0300 Subject: [PATCH] in-web: expired share links no longer suppress the create form --- crates/in-web/src/share.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/in-web/src/share.rs b/crates/in-web/src/share.rs index 20e4c62..052a7a1 100644 --- a/crates/in-web/src/share.rs +++ b/crates/in-web/src/share.rs @@ -1621,7 +1621,12 @@ pub(crate) async fn share_modal<'a>( let live: Vec<_> = links .into_iter() .filter(|link| { - link.kind == kind && link.target_id == target_id && link.revoked_at.is_none() + // An expired link is as dead as a revoked one for form purposes: + // it must not suppress the create form. + link.kind == kind + && link.target_id == target_id + && link.revoked_at.is_none() + && link.expires_at.is_none_or(|at| at > OffsetDateTime::now_utc()) }) .collect(); let grants = match store.shares_for_target(&user.id, kind, target_id).await {