code wiki / _hdl_build / nx_galx_authz.nx

nx_galx_authz.nx

buildroot/runtime/_hdl_build/nx_galx_authz.nx

4360 B90 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind librarytopic galx
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_galx_authz.nx nx_galx_authz_gate.nx nx_media_path_gate.nx nx_media_server.nx

imports: nx_syscalls.nx

imported by: nx_galx_authz_gate.nxnx_media_path_gate.nxnx_media_server.nx

structs

none

consts

11const GALX_FAMILY: i64 = 1
12const GALX_OWNER: i64 = 3

functions

16func galx_cat_of(b: *u8, ls: i64, le: i64, rb: *u8, rsz: i64) -> i64
called by 2: galx_can_viewmain
47func galx_cat_level(cat: i64) -> i64
called by 2: galx_can_viewmain
54func galx_can_view(level: i64, b: *u8, ls: i64, le: i64, rb: *u8, rsz: i64) -> i64
called by 1: main calls 2: galx_cat_ofgalx_cat_level
60func galx_starts(p: *u8, plen: i64, pre: *u8) -> i64
called by 1: galx_media_path_ok
68func galx_has(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: galx_media_path_ok
82func galx_media_path_ok(path: *u8, plen: i64) -> i64