Grants: a consumed seat event matches the seat's event of that name whatever parts its subject has; a consume of a seat that says no such event is refused aloud, never a module's event

Builds: design 47 G A-409
This commit is contained in:
2026-11-14 22:55:59 +01:00
parent 0071181fb1
commit da82c2cf80
7 changed files with 166 additions and 24 deletions
@@ -1658,6 +1658,8 @@ func TestWatchedEventSubjectTakesTheDefinitionsParts(t *testing.T) {
"catalog-revision.*", "mesh.seat.mesh-catalog.event.catalog-revision.*"},
{"several parts", Seat{Name: "mesh-pipeline-runner", Scope: "mesh", EventSubjects: map[string]string{"group-ended.*.*": "group-ended.<branch>.<group>"}},
"group-ended", "mesh.seat.mesh-pipeline-runner.event.group-ended.*.*"},
{"a part between words", Seat{Name: "mesh-pipeline-runner", Scope: "mesh", EventSubjects: map[string]string{"milestone.*.asked": "milestone.<milestone>.asked"}},
"milestone.asked", "mesh.seat.mesh-pipeline-runner.event.milestone.*.asked"},
{"event without parts", Seat{Name: "mesh-catalog", Scope: "mesh", EventSubjects: map[string]string{"catalog-revision.*": "catalog-revision.<branch>"}},
"registration-changed", "mesh.seat.mesh-catalog.event.registration-changed"},
{"another event sharing a prefix", Seat{Name: "mesh-catalog", Scope: "mesh", EventSubjects: map[string]string{"catalog-revision.*": "catalog-revision.<branch>"}},