feat(notify): add notif to internal users when granted

- add coalesced protection to avoid mail bombing if an invited goes many grant in a short period
    - add resentd method in share menu item (work for both internal and external users)
    - user can disable email notification via his properties
    - add env variable from admin to disable notifications
This commit is contained in:
Edouard Vanbelle
2026-06-05 09:46:51 +02:00
parent b8e8fcd7dc
commit 8cc21f17c5
45 changed files with 1906 additions and 81 deletions
+7
View File
@@ -279,6 +279,13 @@ pub struct OutgoingGrantEntry {
/// True when the token subject has a password set (`storage.shares.password_hash IS NOT NULL`).
/// Always `false` for `user` subjects.
pub has_password: bool,
/// True when the user subject is a magic-link-only external user
/// (`auth.users.is_external = TRUE`). Always `false` for token and
/// group subjects, and for internal-user subjects. Surfaced on the
/// My Shares DTO so the frontend's per-row menu can label the
/// notify item "Resend invitation email" (external) vs "Notify by
/// email" (internal).
pub is_external: bool,
}
/// All subjects that the current user has shared a single resource with,