Add permission to admin
This commit is contained in:
parent
22639a489a
commit
a5d87b8e25
@ -75,7 +75,7 @@ function RecipeDetails({ recipe, onEditClick, onDeleteClick, onShowDeleteModal,
|
|||||||
</footer>
|
</footer>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isAuthenticated && currentUser && Number(recipe.user_id) === Number(currentUser.id) && (
|
{isAuthenticated && currentUser && (Number(recipe.user_id) === Number(currentUser.id) || currentUser.is_admin) && (
|
||||||
<div className="recipe-actions">
|
<div className="recipe-actions">
|
||||||
<button className="btn ghost small" onClick={() => onEditClick(recipe)}>
|
<button className="btn ghost small" onClick={() => onEditClick(recipe)}>
|
||||||
✏️ ערוך
|
✏️ ערוך
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user