misuzu/public-legacy/manage/forum/index.php

19 lines
589 B
PHP
Raw Normal View History

2022-09-13 13:14:49 +00:00
<?php
namespace Misuzu;
if(!$msz->isLoggedIn() || !perms_check_user(MSZ_PERMS_GENERAL, $msz->getActiveUser()->getId(), MSZ_PERM_FORUM_MANAGE_FORUMS)) {
2022-09-13 13:14:49 +00:00
echo render_error(403);
return;
}
$rawPerms = perms_create(MSZ_FORUM_PERM_MODES);
$perms = manage_forum_perms_list($rawPerms);
if(!empty($_POST['perms']) && is_array($_POST['perms'])) {
$finalPerms = manage_perms_apply($perms, $_POST['perms'], $rawPerms);
$perms = manage_forum_perms_list($finalPerms);
Template::set('calculated_perms', $finalPerms);
}
2023-08-28 01:17:34 +00:00
Template::render('manage.forum.listing', compact('perms'));