code wiki / _hdl_build / nx_galx_authz.nx
nx_galx_authz.nx
buildroot/runtime/_hdl_build/nx_galx_authz.nx
about
nx_galx_authz.nx -- maps the EXISTING gallery catalog categories (galx_vid_rules.tsv) to ACCESS LEVELS, per
the operator's model (2026-06-17): the gallery holds the OWNER-ONLY stuff (cam recordings + NSFW reddit/tumblr/
redgifs); the SFW media library (Zatoichi, Mr Bean) is a different area served family-level. Categories
(from galx_vid_rules, first-substring-match, default 'r'): m=Media(SFW) r=Recordings(cam) v=Videos(NSFW).
Mapping: m -> FAMILY (1, watch anywhere); r + v (+ any default) -> OWNER (3, ONLY elder, nobody else).
galx_cat_of mirrors nx_gallery_serve's gs_path_cat so the gate can prove path->category->level WITHOUT
importing the daemon. The gallery daemon composes: nx_sa_validate_handle -> level -> galx_can_view per item +
filter the listing (owner-only items never even listed below owner). license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_galx_authz_gate.nxnx_media_path_gate.nxnx_media_server.nx
structs
| none |
consts
| 11 | const GALX_FAMILY: i64 = 1 |
| 12 | const GALX_OWNER: i64 = 3 |
functions
| 16 | func galx_cat_of(b: *u8, ls: i64, le: i64, rb: *u8, rsz: i64) -> i64 |
| 47 | func galx_cat_level(cat: i64) -> i64 |
| 54 | func galx_can_view(level: i64, b: *u8, ls: i64, le: i64, rb: *u8, rsz: i64) -> i64 |
| 60 | func galx_starts(p: *u8, plen: i64, pre: *u8) -> i64 called by 1: galx_media_path_ok |
| 68 | func galx_has(hay: *u8, hn: i64, needle: *u8) -> i64 called by 1: galx_media_path_ok |
| 82 | func galx_media_path_ok(path: *u8, plen: i64) -> i64 |