From 0893805ac48085e25f3eb00a75b0b935301b67d0 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 21 Oct 2026 16:49:57 +0100 Subject: [PATCH 1/3] + ticketing and complexity --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 79e711258..6d4784bad 100644 --- a/README.md +++ b/README.md @@ -138,11 +138,9 @@ Dans le cas des arrhes, à tout moment, jusqu'avant la date et l'heure de la pre ## Limitations -* **Aujourd'hui** : une prestation par commande, sur un axe client → prestataire unique, sans sous-traitance. **Cible roadmap** : montages multi-parties (plusieurs clients et/ou plusieurs fournisseurs collaborant autour d'un même projet, avec sous-traitance validée par le client) — voir la [ROADMAP](../ROADMAP.md). * **Annulation : partielle et non testée.** Côté client, `HairCutCommandController.ClientCancel` / `ClientCancelConfirm` supprime la commande **sans déclencher de refund PayPal** ni logique arrhes vs avance ; aucune action d'annulation côté prestataire. La description du README (arrhes +20%, avance non-annulable) **n'est pas implémentée**. Cible : câbler `RefundTransaction` et le workflow complet, voir [ROADMAP](../ROADMAP.md). * **Réclamation post-prestation : aucun support applicatif.** Passée la date de la prestation, le client n'a aucun chemin dans l'UI pour signaler un litige — aucune route, aucun contrôleur, aucun modèle. La fonctionnalité de conciliation est planifiée au **Jalon 5** (cf. [doc/ddd-exploration-2026-06-14.md](../doc/ddd-exploration-2026-06-14.md)) : double vue client/prestataire, dossier de conciliation, décision. En attendant, tout passe par e-mail au propriétaire de l'installation. * **Paiement : PayPal uniquement, via l'API NVP/SOAP.** Aucun autre PSP n'est intégré (pas de Stripe, pas d'Adyen). L'API NVP/SOAP que PayPal a dépréciée au profit de REST reste fonctionnelle mais n'est plus recommandée par PayPal ; aucune migration n'est planifiée à court terme. -* **Périmètre métier étroit.** Pas de saisie de structures de projets complexes ; pas de ticketing associé à la prestation. * **Collecte centralisée.** Tous les paiements PayPal transitent par le compte du propriétaire de l'installation — c'est le seul identifiant configuré côté PSP. Les professionnels apparaissent comme tierces parties du point de vue PayPal. * **Pas de gestion de paie.** Aucune édition de fiche de paye, ni paiement en masse. Seuls les paiements unitaires sus-cités sont supportés. From e7e6b375f56890c8a61277805292e192ef28c1a6 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 21 Oct 2026 17:15:13 +0100 Subject: [PATCH 2/3] Add performer podcast public permalink Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 4 + .../Contracting/FrontOfficeController.cs | 89 ++++++++++++++++++- .../FrontOffice/PerformerPodcasts.cshtml | 59 ++++++++++++ 3 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml diff --git a/CHANGELOG.md b/CHANGELOG.md index ebc869911..bdbac6717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ### Added +* [Yavsc.Org] Permalien public de podcasts performer avec jeton a duree + limitee, page Razor de presentation et bandeau de prospection vers + l'inscription Yavsc et le telechargement de PostIt. + ### Changed ### Fixed diff --git a/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs b/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs index ac97193d0..be0dd8942 100644 --- a/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs +++ b/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs @@ -1,7 +1,9 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Identity; using System.Security.Claims; +using System.Text.Json; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Mvc; namespace Yavsc.Controllers { @@ -10,6 +12,7 @@ namespace Yavsc.Controllers using Microsoft.Extensions.Localization; using Models; using ViewModels.FrontOffice; + using Yavsc.Abstract.Streaming; using Yavsc.Server.Helpers; using Yavsc.Services; @@ -20,18 +23,24 @@ namespace Yavsc.Controllers readonly ILogger _logger; readonly IStringLocalizer _SR; private readonly IBillingService _billing; + private readonly IDataProtectionProvider _dataProtectionProvider; + private readonly ILiveProcessor _liveProcessor; public FrontOfficeController(ApplicationDbContext context, UserManager userManager, IBillingService billing, ILoggerFactory loggerFactory, - IStringLocalizer SR) + IDataProtectionProvider dataProtectionProvider, + ILiveProcessor liveProcessor, + IStringLocalizer SR) { _context = context; _userManager = userManager; _logger = loggerFactory.CreateLogger(); _SR = SR; _billing = billing; + _dataProtectionProvider = dataProtectionProvider; + _liveProcessor = liveProcessor; } public ActionResult Index() @@ -77,5 +86,77 @@ namespace Yavsc.Controllers return View(result); } + [AllowAnonymous] + public async Task PerformerPodcasts(string id, string? token) + { + if (string.IsNullOrWhiteSpace(id)) return NotFound(); + + if (!TryValidateToken(id, token, out var expireAt)) + return BadRequest("Ce lien public de podcast a expire ou est invalide."); + + var performer = await _context.Performers + .Include(p => p.Performer) + .FirstOrDefaultAsync(p => p.PerformerId == id); + + if (performer == null) return NotFound(); + + var podcasts = (await _liveProcessor.ListAsync(HttpContext.RequestAborted)) + .Where(p => string.Equals(p.OwnerId, id, StringComparison.Ordinal)) + .OrderByDescending(p => p.CreatedAt) + .ToArray(); + + ViewBag.PerformerName = performer.Performer?.UserName ?? performer.PerformerId; + ViewBag.PerformerId = id; + ViewBag.PermalinkExpiry = expireAt; + ViewBag.Permalink = Url.Action(nameof(PerformerPodcasts), "FrontOffice", new { id, token = CreateToken(id) }, Request.Scheme, Request.Host.Value); + + return View(podcasts); + } + + [Authorize] + public IActionResult GeneratePerformerPodcastPermalink(string id) + { + var currentUserId = User.GetUserId(); + if (string.IsNullOrWhiteSpace(currentUserId) || !string.Equals(currentUserId, id, StringComparison.Ordinal)) + return Forbid(); + + var token = CreateToken(id); + return RedirectToAction(nameof(PerformerPodcasts), new { id, token }); + } + + private string CreateToken(string performerId) + { + var expiresAt = DateTimeOffset.UtcNow.AddHours(24); + var protector = _dataProtectionProvider.CreateProtector("Yavsc.Org.PerformerPodcastLink"); + var payload = new + { + performerId, + exp = expiresAt.ToUnixTimeSeconds(), + }; + return protector.Protect(JsonSerializer.Serialize(payload)); + } + + private bool TryValidateToken(string performerId, string? token, out DateTimeOffset validUntil) + { + validUntil = DateTimeOffset.MinValue; + if (string.IsNullOrWhiteSpace(token)) return false; + + try + { + var protector = _dataProtectionProvider.CreateProtector("Yavsc.Org.PerformerPodcastLink"); + var payload = JsonDocument.Parse(protector.Unprotect(token)); + var ownerId = payload.RootElement.GetProperty("performerId").GetString(); + var expiry = payload.RootElement.GetProperty("exp").GetInt64(); + + if (!string.Equals(ownerId, performerId, StringComparison.Ordinal)) return false; + + validUntil = DateTimeOffset.FromUnixTimeSeconds(expiry); + return validUntil > DateTimeOffset.UtcNow; + } + catch + { + return false; + } + } } } diff --git a/src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml b/src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml new file mode 100644 index 000000000..2c3e55db1 --- /dev/null +++ b/src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml @@ -0,0 +1,59 @@ +@model IReadOnlyList +@{ + ViewBag.Title = $"Podcasts de {ViewBag.PerformerName}"; + var performerName = ViewBag.PerformerName ?? "ce performer"; +} + +
+ + + @if (Model == null || Model.Count == 0) + { +
+ Aucun podcast public n'est encore disponible pour @performerName. +
+ } + else + { +
+ @foreach (var podcast in Model) + { +
+
+
+
+
+

@podcast.Title

+ + @podcast.CreatedAt.ToLocalTime().ToString("g") + +
+ @podcast.State +
+ +

+ @podcast.DurationSeconds.ToString("0.##") s · @podcast.SegmentCount segments · @((podcast.Bytes / 1024.0 / 1024.0).ToString("0.##")) Mo +

+ + +
+
+
+ } +
+ } +
From d192705f29e6fd6a54baa4908473ef1e362dad81 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 21 Oct 2026 17:25:07 +0100 Subject: [PATCH 3/3] Add performer public permalink actions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 55 +++++++++------ doc/onboarding-agents.md | 14 ++++ .../Contracting/FrontOfficeController.cs | 70 ++++++++++++++++++- .../FrontOffice/PerformerPodcasts.cshtml | 30 +++++++- .../Views/FrontOffice/Profiles.cshtml | 42 +++++++++++ 5 files changed, 187 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdbac6717..47498be79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ # Changelog -## [1.0.8-rc30] - unstable +## [1.0.8-rc31] - unstable ### Added -* [Yavsc.Org] Permalien public de podcasts performer avec jeton a duree - limitee, page Razor de presentation et bandeau de prospection vers - l'inscription Yavsc et le telechargement de PostIt. +* [Yavsc.Org] Permalien public de podcasts performer avec jeton a durée + limitée, page Razor de presentation et bandeau de prospection vers + l'inscription Yavsc et le téléchargement de PostIt. ### Changed @@ -16,20 +16,31 @@ * avoid NRE in MailSender on rdv query notifications * Android emulator smoke test skipped in CI because Calabash instrumentation signature mismatches the target APK on hosted runners + +## [1.0.8-rc30] - unstable + +### Added + +### Changed + +### Fixed + +* Podcast availability from Android + ## [1.0.8-rc29] - unstable ### Added * [PostIt.Android] Lecture des podcasts directs et replays dans la page - video partagee avec le desktop : surface LibVLC native Android et moteur - embarque, transport authentifie commun et controles uniques. Liberation - du lecteur en arriere-plan ; reouverture du flux au retour dans l'application. + video partagée avec le desktop : surface LibVLC native Android et moteur + embarque, transport authentifie commun et contrôles uniques. Liberation + du lecteur en arrière-plan ; réouverture du flux au retour dans l'application. * [PostIt.Android] Emission depuis la camera et le microphone Android (Android 8 minimum), encodage H.264/AAC natif et segmentation MPEG-TS - sur images cles. Interface, envoi authentifie, retries et finalisation + sur images clés. Interface, envoi authentifie, retries et finalisation du replay partages avec le desktop. Service de premier plan avec - notification d'arret et maintien de la capture en arriere-plan. + notification d'arrêt et maintien de la capture en arrière-plan. ### Changed @@ -39,7 +50,7 @@ * [Yavsc.Api, Yavsc.Server] Une demande de rendez-vous ne provoque plus d'erreur 500 (NullReferenceException dans MailSender) : l'API lie - desormais la section Smtp, le modele appsettings-api fournit Site.Owner + désormais la section Smtp, le modèle appsettings-api fournit Site.Owner et Smtp, et un envoi sans configuration mail complete est journalise puis ignore. @@ -51,38 +62,38 @@ * [Yavsc.Api, Yavsc.Server, Yavsc.Api.Client] Creation explicite et idempotente d'une facture depuis un devis doublement signe, avec lignes, total et parties figes. Historique des encaissements hors ligne attestes - par le prestataire et des transactions PayPal verifiees cote serveur ; - references uniques, cumul atomique et protection contre les ecritures - concurrentes. Routes documentees, client HTTP et migration associes. + par le prestataire et des transactions PayPal vérifiées cote serveur ; + references uniques, cumul atomique et protection contre les écritures + concurrentes. Routes documentées, client HTTP et migration associes. -* [Yavsc.Abstract, Yavsc.Server] Modele de solde des commandes facturables : - montants dus et payes persistants, reste a payer et etats non paye, +* [Yavsc.Abstract, Yavsc.Server] Modèle de solde des commandes facturables : + montants dus et payes persistants, reste a payer et états non paye, partiellement paye ou acquitte. L'acquittement depend des montants, et non du seul statut PayPal ; migration sans montant historique invente. * [PostIt.Desktop, Yavsc.Api] Podcasts en direct avec replay HLS conserve : capture camera et microphone par LibVLC (H.264/AAC, segments MPEG-TS), - envoi ordonne et idempotent, catalogue et lecture authentifiee dans PostIt. + envoi ordonne et idempotent, catalogue et lecture authentifiée dans PostIt. L'auteur peut terminer ou supprimer ses emissions ; stockage prive sur - disque, quotas dedies et conservation des segments recus apres interruption. + disque, quotas dédiés et conservation des segments reçus apres interruption. ### Changed ### Fixed -* [Facturation] Les commandes facturees et leur devis ne peuvent plus etre +* [Facturation] Les commandes facturées et leur devis ne peuvent plus être supprimes via les routes de commande usuelles. Les additions distinguent montant verse, solde restant et acquittement ; les anciennes routes de - generation exigent une facture etablie depuis un devis signe. + generation exigent une facture établie depuis un devis signe. ## [1.0.8-rc27] - unstable ### Added * [PostIt.Desktop] Installeur NSIS Windows x64 par utilisateur, sans - elevation : publication autonome, raccourci du menu Demarrer, - protocole `postit://` pour la connexion et desinstallation via Windows. - Instructions de generation ajoutees dans `INSTALL.md`. + elevation : publication autonome, raccourci du menu Démarrer, + protocole `postit://` pour la connexion et désinstallation via Windows. + Instructions de generation ajoutées dans `INSTALL.md`. * [PostIt, Yavsc.Api] Portage des outils des contrôleurs web d’administration : tableau de bord, rôles et affectations, clients OIDC diff --git a/doc/onboarding-agents.md b/doc/onboarding-agents.md index 14a727a17..18852fec1 100644 --- a/doc/onboarding-agents.md +++ b/doc/onboarding-agents.md @@ -65,6 +65,20 @@ Rituels recommandes: - Mensuel: mise a jour du present guide et du playbook. - A chaque incident: ajouter un anti-pattern dans le playbook. +### Reseau de versionnement / git flow pour le CHANGELOG + +Regle obligatoire: +- La section courante du CHANGELOG représente la prochaine version a publier, pas un tag deja créé. +- Un tag deja publie bloque définitivement la section correspondante du CHANGELOG. +- Au commit suivant, si la modification impacte le CHANGELOG, il faut incrémenter la version exposée dans le changelog (version du prochain tag attendu), par exemple: `1.0.8-rc30 -> 1.0.8-rc31`. + +Ordre a respecter a chaque commit qui modifie le produit: +1. Verifier si le dernier tag du CHANGELOG existe deja; si oui, incrémenter la version de la section suivante au lieu de re-écrire la dernière section bloquée. +2. Ouvrir une nouvelle section du CHANGELOG avec ce numero de version incrémenté. +3. Apres seulement, alimenter cette section avec la description du changement. + +En pratique: la version du CHANGELOG est la version "future" a tagger, et elle est incrémentée avant l'écriture de la description; le tag n'est pas créé avant la section, il est seulement établi ensuite lors de la publication effective. + ## Check-list de validation - Le changement indique son impact architecture. diff --git a/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs b/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs index be0dd8942..12b1e9e7a 100644 --- a/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs +++ b/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs @@ -113,6 +113,37 @@ namespace Yavsc.Controllers return View(podcasts); } + [AllowAnonymous] + public async Task PerformerActivity(string id, string activityCode, string? token) + { + if (string.IsNullOrWhiteSpace(id) || string.IsNullOrWhiteSpace(activityCode)) return NotFound(); + + if (!TryValidateToken(id, activityCode, token, out var expireAt)) + return BadRequest("Ce lien public pour cette activité a expire ou est invalide."); + + var performer = await _context.Performers + .Include(p => p.Performer) + .FirstOrDefaultAsync(p => p.PerformerId == id); + + var activity = await _context.Activities + .FirstOrDefaultAsync(a => a.Code == activityCode); + + if (performer == null || activity == null) return NotFound(); + + var profile = (await _context.ListPerformersAsync(_billing, activityCode)) + .Where(p => string.Equals(p.PerformerId, id, StringComparison.Ordinal)) + .ToList(); + + ViewBag.Activity = activity; + ViewBag.PerformerName = performer.Performer?.UserName ?? performer.PerformerId; + ViewBag.PerformerId = id; + ViewBag.PermalinkExpiry = expireAt; + ViewBag.Permalink = Url.Action(nameof(PerformerActivity), "FrontOffice", new { id, activityCode, token = CreateActivityToken(id, activityCode) }, Request.Scheme, Request.Host.Value); + + return View("Profiles", profile); + } + + [HttpPost] [Authorize] public IActionResult GeneratePerformerPodcastPermalink(string id) { @@ -124,6 +155,18 @@ namespace Yavsc.Controllers return RedirectToAction(nameof(PerformerPodcasts), new { id, token }); } + [HttpPost] + [Authorize] + public IActionResult GeneratePerformerActivityPermalink(string id, string activityCode) + { + var currentUserId = User.GetUserId(); + if (string.IsNullOrWhiteSpace(currentUserId) || !string.Equals(currentUserId, id, StringComparison.Ordinal)) + return Forbid(); + + var token = CreateActivityToken(id, activityCode); + return RedirectToAction(nameof(PerformerActivity), new { id, activityCode, token }); + } + private string CreateToken(string performerId) { var expiresAt = DateTimeOffset.UtcNow.AddHours(24); @@ -136,20 +179,45 @@ namespace Yavsc.Controllers return protector.Protect(JsonSerializer.Serialize(payload)); } + private string CreateActivityToken(string performerId, string activityCode) + { + var expiresAt = DateTimeOffset.UtcNow.AddHours(24); + var protector = _dataProtectionProvider.CreateProtector("Yavsc.Org.PerformerActivityLink"); + var payload = new + { + performerId, + activityCode, + exp = expiresAt.ToUnixTimeSeconds(), + }; + return protector.Protect(JsonSerializer.Serialize(payload)); + } + private bool TryValidateToken(string performerId, string? token, out DateTimeOffset validUntil) + => TryValidateTokenInternal(performerId, null, token, out validUntil, "Yavsc.Org.PerformerPodcastLink"); + + private bool TryValidateToken(string performerId, string activityCode, string? token, out DateTimeOffset validUntil) + => TryValidateTokenInternal(performerId, activityCode, token, out validUntil, "Yavsc.Org.PerformerActivityLink"); + + private bool TryValidateTokenInternal(string performerId, string? activityCode, string? token, out DateTimeOffset validUntil, string protectorName) { validUntil = DateTimeOffset.MinValue; if (string.IsNullOrWhiteSpace(token)) return false; try { - var protector = _dataProtectionProvider.CreateProtector("Yavsc.Org.PerformerPodcastLink"); + var protector = _dataProtectionProvider.CreateProtector(protectorName); var payload = JsonDocument.Parse(protector.Unprotect(token)); var ownerId = payload.RootElement.GetProperty("performerId").GetString(); var expiry = payload.RootElement.GetProperty("exp").GetInt64(); if (!string.Equals(ownerId, performerId, StringComparison.Ordinal)) return false; + if (!string.IsNullOrWhiteSpace(activityCode)) + { + if (!payload.RootElement.TryGetProperty("activityCode", out var activityPayload)) return false; + if (!string.Equals(activityPayload.GetString(), activityCode, StringComparison.Ordinal)) return false; + } + validUntil = DateTimeOffset.FromUnixTimeSeconds(expiry); return validUntil > DateTimeOffset.UtcNow; } diff --git a/src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml b/src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml index 2c3e55db1..2d927c74a 100644 --- a/src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml +++ b/src/Yavsc.Org/Views/FrontOffice/PerformerPodcasts.cshtml @@ -2,6 +2,7 @@ @{ ViewBag.Title = $"Podcasts de {ViewBag.PerformerName}"; var performerName = ViewBag.PerformerName ?? "ce performer"; + var permalinkExpiry = ViewBag.PermalinkExpiry is DateTimeOffset expiry ? expiry : DateTimeOffset.MinValue; }
@@ -9,10 +10,11 @@

Découvrez les podcasts de @performerName

- Ce lien public est valable jusqu'au @(((DateTimeOffset)ViewBag.PermalinkExpiry).ToLocalTime().ToString("g")). + Ce lien public est valable jusqu'au @permalinkExpiry.ToLocalTime().ToString("g").

+ S'inscrire Installer PostIt
@@ -57,3 +59,29 @@
} + + diff --git a/src/Yavsc.Org/Views/FrontOffice/Profiles.cshtml b/src/Yavsc.Org/Views/FrontOffice/Profiles.cshtml index a2f5cdab1..d5daf5afd 100644 --- a/src/Yavsc.Org/Views/FrontOffice/Profiles.cshtml +++ b/src/Yavsc.Org/Views/FrontOffice/Profiles.cshtml @@ -2,10 +2,26 @@ @{ ViewBag.Title = (ViewBag.Activity?.Name ?? "Any") ; + var activityCode = ViewBag.Activity?.Code as string; + var performerId = ViewBag.PerformerId as string; + var permalinkExpiry = ViewBag.PermalinkExpiry is DateTimeOffset expiry ? expiry : DateTimeOffset.MinValue; }

@ViewBag.Title

@ViewBag.Activity.Description +@if (!string.IsNullOrWhiteSpace(performerId) && !string.IsNullOrWhiteSpace(activityCode)) +{ + +} + @foreach (var profile in Model) {
@Html.DisplayFor(m=>profile) @@ -15,3 +31,29 @@ } + +