Skip to content

FEAT(video): add transfer_ownership endpoint for admins#1438

Merged
Badatos merged 1 commit intoEsupPortail:dev_v5from
GiorgioUtzeri:clean-admin-transfer
Apr 28, 2026
Merged

FEAT(video): add transfer_ownership endpoint for admins#1438
Badatos merged 1 commit intoEsupPortail:dev_v5from
GiorgioUtzeri:clean-admin-transfer

Conversation

@GiorgioUtzeri
Copy link
Copy Markdown
Collaborator

feat(video): add transfer_ownership endpoint for admins

This PR introduces a new feature allowing administrators to transfer the ownership (owner) of a video to another user.

Currently, the owner field of a video is set to read-only (ReadOnlyField in VideoSerializer) for obvious security reasons. Therefore, it cannot be modified through the standard PATCH /api/videos/{slug} requests.

What was done:
Added a custom transfer_ownership action (POST method) to the VideoViewSet (/api/videos/{slug}/transfer_ownership/).

However, administrators frequently need the ability to reassign a video to a different user.

Before sending your pull request, make sure the following are done

  • You have read our contribution guidelines.
  • Your PR targets the dev_v5 branch.
  • Your PR status is in draft if it’s still a work in progress.

@Badatos Badatos added this to the 4.x milestone Apr 28, 2026
Copy link
Copy Markdown
Collaborator

@Badatos Badatos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nickel !
J'aime les petites PR 😻

Copy link
Copy Markdown
Collaborator

@LoicBonavent LoicBonavent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nickel, merci. C'est agréable une PR d'1 fichier :)

@Badatos Badatos merged commit abb845a into EsupPortail:dev_v5 Apr 28, 2026
3 checks passed
@GiorgioUtzeri GiorgioUtzeri deleted the clean-admin-transfer branch April 29, 2026 06:54
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.

3 participants