diff --git a/php/controller/showArticle-controller.php b/php/controller/showArticle-controller.php index 6e140f9..6c1e929 100644 --- a/php/controller/showArticle-controller.php +++ b/php/controller/showArticle-controller.php @@ -25,6 +25,14 @@ if (isset($_GET["id"]) && !empty($_GET["id"])){ exit(); } + if($_GET["pfad"] == "updateArticle"){ + if($article->getAuthor() != $_SESSION["user"]){ + $_SESSION["message"] = "unauthorized_access"; + header("location: ../../index.php"); + exit(); + } + } + $commentManager = CommentManager::getInstance(); $comments = $commentManager->getCommentsByArticle($_GET["id"]);