Closed bbelderbos closed 11 months ago
TODO: when a tune can be owned later by somebody, we also need to check here if it's the tune of `request.user`
_Originally posted by @bbelderbos in https://github.com/jwjacobson/jazz_repertoire/pull/13#discussion_r1404076869_
So you can add the owner check to get_object_or_404, something like: get_object_or_404(Model, pk=pk, user=request.user) (the logged in user is always available in the view via request.user)
get_object_or_404
get_object_or_404(Model, pk=pk, user=request.user)
request.user
After https://github.com/jwjacobson/jazz_repertoire/issues/15
_Originally posted by @bbelderbos in https://github.com/jwjacobson/jazz_repertoire/pull/13#discussion_r1404076869_