code wiki / _hdl_build / nx_connect_group_lib.nx
nx_connect_group_lib.nx
buildroot/runtime/_hdl_build/nx_connect_group_lib.nx
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
imports: none
imported by: nx_connect_api_lib.nxnx_connect_group.nxnx_connect_serve.nx
structs
| none |
consts
| 11 | const ROLE_NONE: i64 = 0 |
| 12 | const ROLE_MEMBER: i64 = 1 |
| 13 | const ROLE_ADMIN: i64 = 2 |
| 14 | const ROLE_OWNER: i64 = 3 |
| 15 | const MODE_GROUP: i64 = 0 |
| 16 | const MODE_CHANNEL:i64 = 1 |
| 17 | const LANE_LANG: i64 = 0 |
| 18 | const LANE_DATE: i64 = 3 |
functions
| 20 | func find_mi(meta: *i64, mem: *i64, uid: i64) -> i64 |
| 25 | func role_of(meta: *i64, mem: *i64, uid: i64) -> i64 |
| 30 | func grp_create(meta: *i64, mem: *i64, owner: i64, mode: i64, lane: i64) -> i64 |
| 35 | func grp_add(meta: *i64, mem: *i64, actor: i64, uid: i64, is_minor: i64) -> i64 |
| 43 | func grp_remove(meta: *i64, mem: *i64, actor: i64, uid: i64) -> i64 |
| 57 | func grp_promote(meta: *i64, mem: *i64, actor: i64, uid: i64, newrole: i64) -> i64 |
| 64 | func grp_can_post(meta: *i64, mem: *i64, uid: i64) -> i64 |