nordabiz/utils
Maciej Pienczyn dcbf8b5db6
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
feat(email): one-click unsubscribe w mailach powiadomień (RFC 8058)
Każdy e-mail powiadomieniowy ma teraz:
(1) link w stopce "Wyłącz ten typ powiadomień jednym kliknięciem"
(2) nagłówki List-Unsubscribe + List-Unsubscribe-Post dla klientów
    pocztowych (Gmail/Apple Mail pokażą natywny przycisk Unsubscribe)

Implementacja:
- utils/unsubscribe_tokens.py: signed token (itsdangerous, SECRET_KEY)
  niosący user_id + notification_type, bez wygasania
- blueprints/unsubscribe: GET /unsubscribe?t=TOKEN → strona potwierdzenia,
  POST /unsubscribe → faktyczne wyłączenie flagi notify_email_<type>
- email_service.send_email() dostał parametr notification_type. Jeśli
  przekazany razem z user_id, footer + headery są doklejane
- Aktualizowane wywołania: message_notification (messages),
  classified_question/answer (B2B Q&A), classified_expiry (skrypt cron)

Prefetch safety: GET pokazuje stronę z przyciskiem "Tak, wyłącz",
wyłączenie następuje po POST. RFC 8058 One-Click (POST bez formularza
z Content-Type application/x-www-form-urlencoded + body
"List-Unsubscribe=One-Click") obsługuje klientów pocztowych.

D.2/D.3 dorzucą kolejne notification_type (forum, broadcast, events).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 17:56:36 +02:00
..
__init__.py feat(notifications): Add notifications for releases and announcements 2026-01-27 14:22:44 +01:00
analytics.py debug: add middleware-level mobile cookie logging 2026-03-18 11:05:04 +01:00
CLAUDE.md claude-mem plugin v10.3.3 2026-02-23 10:33:26 +01:00
context_processors.py refactor(phase1): Extract blueprints for reports, contacts, classifieds, calendar 2026-01-27 10:10:45 +01:00
data_quality.py feat: enhance data quality dashboard with filters, hints, weighted scores and contact scraping 2026-02-21 07:25:39 +01:00
decorators.py fix(audit): allow company MANAGER to view own audit dashboards 2026-03-19 17:24:36 +01:00
error_handlers.py refactor(phase1): Extract blueprints for reports, contacts, classifieds, calendar 2026-01-27 10:10:45 +01:00
helpers.py fix(messages): allow data: protocol in bleach for base64 images + img width/height/style attrs 2026-03-30 16:18:11 +02:00
history_formatter.py feat: format founding_history into structured HTML sections 2026-03-16 22:45:28 +01:00
markdown.py feat(forum): beautify Google Maps URLs + fix edit/quote raw content 2026-04-14 14:38:59 +02:00
middleware.py debug: add middleware-level mobile cookie logging 2026-03-18 11:05:04 +01:00
notifications.py feat(email): one-click unsubscribe w mailach powiadomień (RFC 8058) 2026-04-14 17:56:36 +02:00
onboarding.py fix(onboarding): fix 404 on 'Uzupełnij' links in dashboard progress widget 2026-04-08 14:21:08 +02:00
permissions.py feat: Add hierarchical role system with delegated permissions 2026-02-01 06:42:39 +01:00
unsubscribe_tokens.py feat(email): one-click unsubscribe w mailach powiadomień (RFC 8058) 2026-04-14 17:56:36 +02:00