1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-31 11:20:15 +02:00

v2.3.0 block content with the slug tm ticket 448

This commit is contained in:
trendschau
2024-03-12 20:09:50 +01:00
parent 998a8833aa
commit dfe5861f33

View File

@@ -444,6 +444,15 @@ class ControllerApiAuthorArticle extends Controller
$draftNavigation = $navigation->getDraftNavigation($urlinfo, $langattr);
if($params['folder_id'] == 'root')
{
if($params['item_name'] == 'tm')
{
$response->getBody()->write(json_encode([
'message' => Translations::translate('You cannot create an item with the slug /tm in the root folder because this is the system path.')
]));
return $response->withHeader('Content-Type', 'application/json')->withStatus(402);
}
$folderContent = $draftNavigation;
}
else