24 lines
710 B
PHP
24 lines
710 B
PHP
<?php
|
|
|
|
use MintyPHP\Buffer;
|
|
use MintyPHP\Support\Guard;
|
|
use MintyPHP\Session;
|
|
use MintyPHP\Service\Access\PermissionService;
|
|
|
|
Guard::requireLogin();
|
|
Guard::requirePermission(PermissionService::MAIL_LOG_VIEW);
|
|
|
|
$currentUserId = (int) ($_SESSION['user']['id'] ?? 0);
|
|
if ($currentUserId > 0) {
|
|
PermissionService::getUserPermissions($currentUserId);
|
|
}
|
|
|
|
Buffer::set('title', t('Mail logs'));
|
|
Buffer::set('grid_lang', json_encode(gridLang(), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
|
|
$csrfKey = Session::$csrfSessionKey;
|
|
$csrfToken = $_SESSION[$csrfKey] ?? '';
|
|
Buffer::set(
|
|
'grid_csrf',
|
|
json_encode(['key' => $csrfKey, 'token' => $csrfToken], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)
|
|
);
|