Users (Tools > Users) - Everyone can update their display name, email and password; administrators can add, edit, invite (one-time link), block and delete accounts. - Accounts in config.local.php stay locked to config (the main administrator); CMS accounts live in data/users.json. Sign-in is by login name. - Roles are now editor and administrator (publisher is an alias of editor). - Account protection: password hashes only (12-72 characters), administrator password confirmation for sensitive actions, rate-limited failures, hashed single-use invite tokens, self-lockout guards, sessions of blocked/deleted users end on the next request, every account event audited without secrets. - dataDirectory can move data outside the web root; the dashboard recommends it. Media library - Upload images, documents, video and audio, sorted into four categories by extension. - Extension allow-list; executables, scripts, HTML/SVG, archives, legacy and macro Office files refused; content sniffing; files containing code refused; PDFs with scripts refused; Office/OpenDocument packages inspected for macros and embedded objects. - Media library button in the editor inserts an image, document link, video or audio. Navigation menus, pages and interface - The site scan detects primary/secondary navigation and seeds Navigation Menus; menus can be renamed, edited and deleted but not created by the CMS; a scan button finds new navigation. - New page wizard (template, name, navigation group) in the Pages dialogue; new pages stay private drafts until published; pages can be used as templates. - Deleted pages can be recovered from the Dashboard. - Full-width top bar with the user at the top right, device icons, consistent buttons. Tests and docs updated (tests/run.php, README, ARCHITECTURE, DEVELOPMENT, CHANGELOG). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
68 lines
2.7 KiB
PHP
68 lines
2.7 KiB
PHP
<?php
|
|
/**
|
|
* NeoCMS site configuration.
|
|
*
|
|
* Keep credentials in the ignored config.local.php override rather than this tracked defaults file.
|
|
* No account is enabled by default; configure a password hash and role before exposing /cms/.
|
|
*/
|
|
|
|
$config = [
|
|
'authentication' => [
|
|
// 'admin' => '$2y$10$replace-with-a-real-password-hash',
|
|
],
|
|
// Accounts here are the main administrators and are managed only in this file. Other accounts are created in the CMS (Tools > Users).
|
|
// Roles: editor (edit, publish, schedule) or administrator (everything, including users). The old 'publisher' role counts as editor.
|
|
'roles' => [
|
|
// 'admin' => 'administrator',
|
|
],
|
|
// Session expiry and login throttling. Set cookieSecure to true behind a TLS reverse proxy.
|
|
'security' => [
|
|
'idleTimeout' => 1800,
|
|
'absoluteTimeout' => 43200,
|
|
'cookieSecure' => null,
|
|
'loginWindowSeconds' => 900,
|
|
'loginLockoutSeconds' => 900,
|
|
'loginMaxAttempts' => 5,
|
|
'loginMaxAddressAttempts' => 20,
|
|
'maxContentBytes' => 5 * 1024 * 1024,
|
|
'maxRequestBytes' => 6 * 1024 * 1024,
|
|
'maxManagedPages' => 5000,
|
|
'maxScannedEntries' => 20000,
|
|
'maxDraftBytes' => 250 * 1024 * 1024,
|
|
'maxSchedules' => 100,
|
|
'maxScheduledBytes' => 250 * 1024 * 1024,
|
|
'maxRevisionsPerPage' => 50,
|
|
'maxRevisionsTotal' => 2000,
|
|
'maxRevisionBytes' => 500 * 1024 * 1024,
|
|
'auditMaxFileBytes' => 10 * 1024 * 1024,
|
|
'auditRetentionDays' => 90,
|
|
],
|
|
// Upload constraints limit both individual image complexity and total disk consumption.
|
|
'uploads' => [
|
|
'maxFileBytes' => 10 * 1024 * 1024,
|
|
'maxWidth' => 8192,
|
|
'maxHeight' => 8192,
|
|
'maxPixels' => 24 * 1024 * 1024,
|
|
'maxFiles' => 2000,
|
|
'maxTotalBytes' => 500 * 1024 * 1024,
|
|
],
|
|
// Record authentication and content-management activity in daily files under cms/logs/.
|
|
'audit' => true,
|
|
// Skip the built-in welcome page and open the public site immediately after login.
|
|
'skipWelcomePage' => false,
|
|
// Display the path of the page being edited in the administration toolbar.
|
|
'showFullUrl' => true,
|
|
// CSS class used to mark page regions as editable. Use a single class name without a leading dot.
|
|
'editableClass' => 'editable',
|
|
];
|
|
|
|
// Merge deployment credentials and overrides from the untracked local configuration, when present.
|
|
$localConfigPath = __DIR__ . '/config.local.php';
|
|
if (is_file($localConfigPath)) {
|
|
$localConfig = require $localConfigPath;
|
|
if (!is_array($localConfig)) {
|
|
throw new \RuntimeException('cms/config.local.php must return an array');
|
|
}
|
|
$config = array_replace_recursive($config, $localConfig);
|
|
}
|