allow admins to edit any recipe
This commit is contained in:
		
							parent
							
								
									8871d9bb21
								
							
						
					
					
						commit
						ef61cbcb3e
					
				| @ -41,7 +41,9 @@ final class RecipeController | ||||
|         } | ||||
| 
 | ||||
|         if ($A_recipe["AUTHOR_ID"] !== $_SESSION["ID"]) { | ||||
|             throw new HTTPSpecialCaseException(400, "You are not the owner of this recipe"); | ||||
|             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)); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user