]> source.dussan.org Git - gitea.git/commit
Drop the event source if we are unauthorized (#15275)
authorzeripath <art27@cantab.net>
Sun, 4 Apr 2021 21:37:50 +0000 (22:37 +0100)
committerGitHub <noreply@github.com>
Sun, 4 Apr 2021 21:37:50 +0000 (22:37 +0100)
commit48ef04ee56272da4c8c8fd96b8af13fe82cd8e37
treebba3ddc221666c39818f6ffa5ed2be9f6ae403e8
parentf2715b8e294d53a54bb71876c74a7fbec5b41937
Drop the event source if we are unauthorized (#15275)

A previous commit that sent unauthorized if the user is unauthorized
simply leads to the repeated reopening of the eventsource. #

This PR changes the event returned to tell the client to close the
eventsource and thus prevents the repeated reopening.

Signed-off-by: Andrew Thornton <art27@cantab.net>
routers/events/events.go
web_src/js/features/eventsource.sharedworker.js
web_src/js/features/notification.js
web_src/js/features/stopwatch.js