Added checks for admin permissions to settings / users.
Added welcome message and start page contents in input interface (iss0000160).
This commit is contained in:
@ -23,10 +23,14 @@ loadHttpToGlobals(["id", "task", "content"]);
|
||||
|
||||
define("targetFile", __DIR__ . "/../data/$id.htm");
|
||||
|
||||
if (!isset($id) or !in_array($id, ['footer', 'aside', 'banner'])) {
|
||||
if (!isset($id) or !in_array($id, ['footer', 'aside', 'banner', 'welcomeMsg'])) {
|
||||
echo printErrorPage($translations['specifyToEdit']); return;
|
||||
}
|
||||
|
||||
if ($id == 'welcomeMsg' and !$_SESSION['admin']) {
|
||||
echo printErrorPage($translations['accessDenied']); return;
|
||||
}
|
||||
|
||||
// Read file contents if there is no new content sent by $_POST.
|
||||
|
||||
if (!isset($content)) {
|
||||
|
Reference in New Issue
Block a user