generate screenshot using Xlib.

This commit is contained in:
Miroslav Šedivý
2021-01-21 20:44:09 +01:00
parent 7ff6ada205
commit afd3dd2f56
8 changed files with 110 additions and 1 deletions

View File

@ -66,3 +66,14 @@ func CanHostOnly(next http.Handler) http.Handler {
}
})
}
func CanWatchOnly(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
session := GetSession(r)
if !session.CanWatch() {
utils.HttpForbidden(w, "Only for members, that can watch.")
} else {
next.ServeHTTP(w, r)
}
})
}