<?php
namespace Misuzu;

use Misuzu\Users\User;

if(!User::hasCurrent()
    || !perms_check_user(MSZ_PERMS_GENERAL, User::getCurrent()->getId(), MSZ_PERM_GENERAL_MANAGE_CONFIG)) {
    echo render_error(403);
    return;
}

$hidden = $cfg->getArray('settings.hidden');
$vars = $cfg->getAllValueInfos();

Template::render('manage.general.settings', [
    'config_vars' => $vars,
    'config_hidden' => $hidden,
]);
