Fix share permission check

This commit is contained in:
swnf 2022-10-06 17:44:33 +02:00
parent 32a663c5d7
commit 4de9a7ff89

View File

@ -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,