web/website/integrations/mybb/forum-access.php
unimatrixgit 77cdf19faa Checkpoint Alpha 1.0.0.3 graphical menus and moderation evidence
Preserve the current Alpha source and artwork snapshot. See handoff/alpha-1.0.0.3 for actual deployed hashes, checks, staged follow-ups and the production pause. This checkpoint does not claim every source feature is deployed.
2026-11-02 00:05:34 +01:00

10 lines
509 B
PHP

<?php
// Central permission nodes are authoritative; rank names never imply forum powers.
function dune_forum_can_admin($identity){
return is_array($identity)&&is_array($identity['permissions']??null)&&in_array('web.forum.admin',$identity['permissions'],true);
}
function dune_forum_group_for($identity){
if(dune_forum_can_admin($identity))return 4;
$nodes=is_array($identity)&&is_array($identity['permissions']??null)?$identity['permissions']:[];
return in_array('web.forum.moderate',$nodes,true)?6:2;
}