From 4de9a7ff8979f6c520606c73dd786d84619fb449 Mon Sep 17 00:00:00 2001 From: swnf <50806201+swnf@users.noreply.github.com> Date: Thu, 6 Oct 2022 17:44:33 +0200 Subject: [PATCH] Fix share permission check --- cookbook/views/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 91ef3ee7a..10fb85590 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -1382,7 +1382,7 @@ def sync_all(request): def share_link(request, pk): - if request.space.allow_sharing and has_group_permission(request.user, 'user'): + if request.space.allow_sharing and has_group_permission(request.user, ('user',)): recipe = get_object_or_404(Recipe, pk=pk, space=request.space) link = ShareLink.objects.create(recipe=recipe, created_by=request.user, space=request.space) return JsonResponse({'pk': pk, 'share': link.uuid,