fix(webdav): `disabled` is not working in webdav (#3659)

A disabled user with webdav permission can use webdav normally, which is not allowed.
pull/3665/head
Karbob 2023-02-28 18:26:13 +08:00 committed by GitHub
parent c9c4d6bc7e
commit 93dd768234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ func WebDAVAuth(c *gin.Context) {
c.Abort()
return
}
if !user.CanWebdavRead() {
if user.Disabled || !user.CanWebdavRead() {
if c.Request.Method == "OPTIONS" {
c.Set("user", guest)
c.Next()