Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4 Create new arguments #217

Merged
merged 18 commits into from
Jun 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: IsOwnerOrReadOnly checks for userOwnerId
  • Loading branch information
seporterfield committed Jun 26, 2024
commit 288b39204dd4a351c88635f666161f268dff2f86
4 changes: 2 additions & 2 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def has_object_permission(self, request, view, obj):
# so we'll always allow GET, HEAD or OPTIONS requests.
if request.method in SAFE_METHODS:
return True
# Instance must have an attribute named `owner`.
return obj.owner == request.user
# Instance must have an attribute named `ownerUserId`.
return obj.ownerUserId == request.user


def success(request):
Expand Down
Loading