18 lines
589 B
PHP
18 lines
589 B
PHP
<?php
|
|
namespace Misuzu;
|
|
|
|
if(!$msz->isLoggedIn() || !perms_check_user(MSZ_PERMS_GENERAL, $msz->getActiveUser()->getId(), MSZ_PERM_FORUM_MANAGE_FORUMS)) {
|
|
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);
|
|
}
|
|
|
|
Template::render('manage.forum.listing', compact('perms'));
|