Skip to content

fix: scope video cancellation to requesting user instead of global state#66

Open
mayank-dev-15 wants to merge 1 commit into
windoze95:mainfrom
mayank-dev-15:fix/scope-cancel-download-to-user
Open

fix: scope video cancellation to requesting user instead of global state#66
mayank-dev-15 wants to merge 1 commit into
windoze95:mainfrom
mayank-dev-15:fix/scope-cancel-download-to-user

Conversation

@mayank-dev-15

Copy link
Copy Markdown

Fixes #32 - The cancel download endpoint was setting the global Video.status to CATALOGED, affecting all users. In a multi-user system, User A's cancel was changing the video status for User B too.

Changes:

  • Verify the requesting user has an active UserVideoRef for the video
  • Mark only the user's own reference as removed instead of changing global state
  • Only reset global video status to CATALOGED when no active user references remain
  • Returns 403 if user doesn't have an active download for the video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant