Kids gate on the phone's Create: no browsing or searching the library while Kids watches (0.108.106)

Audit S8. Past the remote routes, every phone API is Create's, so one check refuses all of it while a Kids profile is
watching: search, suggestions, shows, facets, collections, browse, channel lists, brands, unplayable, arrivals, Taste
and watch. The remote (now, guide, Catch Up, tune) is unchanged; /api/watch already refused hidden channels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 11:04:08 +00:00
co-authored by Claude Opus 5.5
parent eb3fb7cef2
commit 4d6ea7008d
5 changed files with 15 additions and 5 deletions
@@ -248,8 +248,15 @@ class PhoneLinkTest {
assertEquals(200, call("/api/profile", "POST", """{"id":"$kidsId"}""", cookie = cookie).status); assertTrue(Profiles.kids)
assertEquals(403, call("/api/director", cookie = cookie).status)
assertEquals(403, call("/api/channels", "POST", """{"name":"X","shows":[]}""", cookie = cookie).status)
// Nor browsing or searching the library (8 November 2026, audit S8), while the remote itself still works.
for (path in listOf("/api/search?q=xf", "/api/suggest?d=sci-fi", "/api/shows?number=701", "/api/facets", "/api/collections", "/api/browse?genre=Drama",
"/api/channels", "/api/brands", "/api/unplayable", "/api/arrivals", "/api/taste"))
assertEquals(path, 403, call(path, cookie = cookie).status)
assertEquals(403, call("/api/watch", "POST", """{"number":701}""", cookie = cookie).status)
assertEquals(200, call("/api/now", cookie = cookie).status)
// Back to Adult (no PIN set here, so it goes straight in, as on the TV).
assertEquals(200, call("/api/profile", "POST", """{"id":"$adultId"}""", cookie = cookie).status); assertFalse(Profiles.kids)
assertEquals(200, call("/api/search?q=xf", cookie = cookie).status)
assertEquals(403, call("/api/profile", "POST", """{"id":"nobody"}""", cookie = cookie).status)
} finally { PhoneLink.screen = null; Profiles.current = before }
}