allow admins to edit any recipe

This commit is contained in:
Thomas Rubini 2023-01-24 20:12:16 +01:00
parent 8871d9bb21
commit ef61cbcb3e
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373

View File

@ -41,8 +41,10 @@ final class RecipeController
}
if ($A_recipe["AUTHOR_ID"] !== $_SESSION["ID"]) {
if(!Session::is_admin()){
throw new HTTPSpecialCaseException(400, "You are not the owner of this recipe");
}
}
View::show("recipe/edit", array("POST_URI" => "/recipe/update", "RECIPE" => $A_recipe));
}