allow admins to edit any recipe
This commit is contained in:
parent
8871d9bb21
commit
ef61cbcb3e
@ -41,8 +41,10 @@ final class RecipeController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($A_recipe["AUTHOR_ID"] !== $_SESSION["ID"]) {
|
if ($A_recipe["AUTHOR_ID"] !== $_SESSION["ID"]) {
|
||||||
|
if(!Session::is_admin()){
|
||||||
throw new HTTPSpecialCaseException(400, "You are not the owner of this recipe");
|
throw new HTTPSpecialCaseException(400, "You are not the owner of this recipe");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
View::show("recipe/edit", array("POST_URI" => "/recipe/update", "RECIPE" => $A_recipe));
|
View::show("recipe/edit", array("POST_URI" => "/recipe/update", "RECIPE" => $A_recipe));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user