feat(admin): improve email reminders UX and fix signer deletion

Backend changes:
- Add SMTPEnabled flag to distinguish SMTP service from MagicLink authentication
- Fix URL-encoded email decoding in DELETE /signers/{email} endpoint
- Add detailed error logging for expected signer removal operations
- Initialize ReminderAsync and MagicLink services unconditionally
- Update config tests to reflect new MagicLink requires explicit enabling

Frontend changes:
- Add ACKIFY_SMTP_ENABLED window variable for feature detection
- Hide delete button for expected signers who have already signed
- Show email reminders card only when SMTP enabled or history exists
- Display informative alert when SMTP disabled but reminder history present
- Add i18n translations for email service disabled message (5 languages)

These changes improve admin experience by preventing invalid operations
(deleting signers who signed, sending emails without SMTP) and providing
clear feedback about feature availability.
This commit is contained in:
Benjamin
2025-11-22 00:27:16 +01:00
parent 34146fb02d
commit da1f300d2d
14 changed files with 140 additions and 66 deletions

View File

@@ -56,6 +56,28 @@ ACKIFY_OAUTH_LOGOUT_URL=https://your-provider.com/logout
ACKIFY_OAUTH_SCOPES=openid,email,profile
```
### Authentication Methods
**Important**: At least ONE authentication method must be enabled (OAuth or MagicLink).
```bash
# Force enable/disable OAuth (default: auto-detected from credentials)
ACKIFY_AUTH_OAUTH_ENABLED=true
# Enable MagicLink passwordless authentication (default: false)
# Requires ACKIFY_MAIL_HOST to be configured
ACKIFY_AUTH_MAGICLINK_ENABLED=true
```
**Auto-detection**:
- **OAuth** is automatically enabled if `ACKIFY_OAUTH_CLIENT_ID` and `ACKIFY_OAUTH_CLIENT_SECRET` are set
- **MagicLink** requires explicit activation with `ACKIFY_AUTH_MAGICLINK_ENABLED=true` + SMTP configuration
- **SMTP/Email service** is automatically enabled when `ACKIFY_MAIL_HOST` is configured (independent of MagicLink)
**Note**: SMTP and MagicLink are two distinct features:
- **SMTP** = Email reminder service for expected signers (auto-detected)
- **MagicLink** = Passwordless email authentication (requires explicit activation + SMTP)
### Administration
```bash

View File

@@ -56,6 +56,28 @@ ACKIFY_OAUTH_LOGOUT_URL=https://your-provider.com/logout
ACKIFY_OAUTH_SCOPES=openid,email,profile
```
### Méthodes d'Authentification
**Important** : Au moins UNE méthode d'authentification doit être activée (OAuth ou MagicLink).
```bash
# Forcer l'activation/désactivation d'OAuth (défaut: auto-détecté depuis les credentials)
ACKIFY_AUTH_OAUTH_ENABLED=true
# Activer l'authentification MagicLink sans mot de passe (défaut: false)
# Nécessite que ACKIFY_MAIL_HOST soit configuré
ACKIFY_AUTH_MAGICLINK_ENABLED=true
```
**Auto-détection** :
- **OAuth** est automatiquement activé si `ACKIFY_OAUTH_CLIENT_ID` et `ACKIFY_OAUTH_CLIENT_SECRET` sont définis
- **MagicLink** nécessite une activation explicite avec `ACKIFY_AUTH_MAGICLINK_ENABLED=true` + configuration SMTP
- **Service SMTP/Email** est automatiquement activé quand `ACKIFY_MAIL_HOST` est configuré (indépendant de MagicLink)
**Note** : SMTP et MagicLink sont deux fonctionnalités distinctes :
- **SMTP** = Service d'envoi de rappels email aux signataires attendus (auto-détecté)
- **MagicLink** = Authentification sans mot de passe par email (nécessite activation explicite + SMTP)
### Administration
```bash