mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-28 02:56:17 +08:00
Feat: mount storage policy for folders in WebDAV
This commit is contained in:
@ -97,8 +97,8 @@ func WebDAVAuth() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
// 密码正确?
|
||||
ok, _ = expectedUser.CheckPassword(password)
|
||||
if !ok {
|
||||
webdav, err := model.GetWebdavByPassword(password, expectedUser.ID)
|
||||
if err != nil {
|
||||
c.Status(http.StatusUnauthorized)
|
||||
c.Abort()
|
||||
return
|
||||
@ -112,6 +112,7 @@ func WebDAVAuth() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
c.Set("user", &expectedUser)
|
||||
c.Set("webdav", webdav)
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user