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

redirect to login on 401, display 403 variant #3632

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

rigelk
Copy link
Collaborator

@rigelk rigelk commented Jan 24, 2021

Description

Outside of components using LoginGuard, we can detect which objects require to be logged in based on their return code, which AuthInterceptor can help us redirect. This is especially useful for internal videos, as mentioned in https://framacolibri.org/t/avoir-le-bouton-de-login-sur-lerreur-404/10761.

Has this been tested?

This is done client-side only, relying on existing server codes, so no tests were added to the CI harness. However, I tested manually for internal, private and blocked videos.

Screenshots

Screenshot_2021-01-24 PeerTube

@rigelk rigelk requested a review from Chocobozzz January 24, 2021 23:09
@Chocobozzz Chocobozzz merged commit ab398a0 into Chocobozzz:develop Jan 25, 2021
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.

2 participants