21 lines
683 B
PHP
21 lines
683 B
PHP
<?php
|
|
namespace Misuzu;
|
|
|
|
use Misuzu\Perm;
|
|
|
|
if(!isset($msz) || !($msz instanceof \Misuzu\MisuzuContext))
|
|
die('Script must be called through the Misuzu route dispatcher.');
|
|
|
|
if(!$msz->authInfo->getPerms('global')->check(Perm::G_FORUM_CATEGORIES_MANAGE))
|
|
Template::throwError(403);
|
|
|
|
$permsInfos = $msz->perms->getPermissionInfo(categoryNames: Perm::INFO_FOR_FORUM_CATEGORY);
|
|
$permsLists = Perm::createList(Perm::LISTS_FOR_FORUM_CATEGORY);
|
|
|
|
if(!empty($_POST))
|
|
Template::set('calculated_perms', Perm::convertSubmission($_POST, Perm::INFO_FOR_FORUM_CATEGORY));
|
|
|
|
Template::render('manage.forum.listing', [
|
|
'perms_lists' => $permsLists,
|
|
'perms_infos' => $permsInfos,
|
|
]);
|