code wiki / _hdl_build / nx_connect_group_lib.nx

nx_connect_group_lib.nx

buildroot/runtime/_hdl_build/nx_connect_group_lib.nx

3266 B70 linesdepth 0pulls 0 transitivereach 13 importersview sourcekind librarytopic connect
docsdependenciesstructsconstsfunctions

about

nx_connect_group_lib.nx -- group + broadcast-channel ROLES and PERMISSIONS, extracted as a shared library so the verifying gate (nx_connect_group) and the LIVE app (nx_connect_serve /community) bind ONE implementation. Until this split the permission model had NO user-facing surface at all. THE MODEL, by construction rather than by policy: OWNER > ADMIN > MEMBER. Only admins add or remove; the OWNER can never be removed; an admin cannot remove a peer or anyone above them, so there is no admin coup; only the owner promotes. A CHANNEL is admin-post / subscriber-read, a GROUP is members-post. The minor-to-romance wall extends to membership, so a minor is never admitted to a DATE-lane group. Symbols moved VERBATIM (no renames): renaming is what de-grounded compare rows on the earlier splits. license_tier: ORIGINAL

dependencies 0 imports · 3 importers

nx_connect_group_lib.nx nx_connect_api_lib.nx nx_connect_group.nx nx_connect_serve.nx

imports: none

imported by: nx_connect_api_lib.nxnx_connect_group.nxnx_connect_serve.nx

structs

none

consts

11const ROLE_NONE: i64 = 0
12const ROLE_MEMBER: i64 = 1
13const ROLE_ADMIN: i64 = 2
14const ROLE_OWNER: i64 = 3
15const MODE_GROUP: i64 = 0
16const MODE_CHANNEL:i64 = 1
17const LANE_LANG: i64 = 0
18const LANE_DATE: i64 = 3

functions

20func find_mi(meta: *i64, mem: *i64, uid: i64) -> i64
25func role_of(meta: *i64, mem: *i64, uid: i64) -> i64
30func grp_create(meta: *i64, mem: *i64, owner: i64, mode: i64, lane: i64) -> i64
35func grp_add(meta: *i64, mem: *i64, actor: i64, uid: i64, is_minor: i64) -> i64
called by 3: ca_v_groupmaincs_grp_seed calls 1: role_of
43func grp_remove(meta: *i64, mem: *i64, actor: i64, uid: i64) -> i64
57func grp_promote(meta: *i64, mem: *i64, actor: i64, uid: i64, newrole: i64) -> i64
64func grp_can_post(meta: *i64, mem: *i64, uid: i64) -> i64
called by 2: maincs_page_community calls 1: role_of