Skip to content

Commit

Permalink
🛂 allow creating/updating via api also with regular authentication, n…
Browse files Browse the repository at this point in the history
…ot just tokens

otherwise, we'd have to generate a token for our frontend
  • Loading branch information
krmax44 committed Nov 8, 2024
1 parent be6021a commit 3f093af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions froide/foirequest/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,6 @@ class CreateOnlyWithScopePermission(TokenHasScope):
def has_permission(self, request, view):
if view.action not in ("create", "update"):
return True
if not request.user.is_authenticated:
return False
if request.user.is_authenticated:
return True
return super().has_permission(request, view)

0 comments on commit 3f093af

Please sign in to comment.