fix: allow admin users to delete other household recipes

This commit is contained in:
mariodz95 2025-07-21 12:39:37 +02:00
commit 237d13f57c

View file

@ -77,7 +77,7 @@ class RecipeService(RecipeServiceBase):
other_household = self.repos.households.get_one(recipe.household_id)
if not (other_household and other_household.preferences):
return False
if other_household.preferences.lock_recipe_edits_from_other_households:
if not self.user.admin and other_household.preferences.lock_recipe_edits_from_other_households:
return False
if recipe.settings.locked:
return False