mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-22 21:04:07 +08:00
chore: unified function name
This commit is contained in:
parent
826e4807dc
commit
5166d73b4d
@ -85,6 +85,6 @@ func (u User) CanWebdavRead() bool {
|
||||
return u.IsAdmin() || (u.Permission>>8)&1 == 1
|
||||
}
|
||||
|
||||
func (u User) CanWebdavWrite() bool {
|
||||
func (u User) CanWebdavManage() bool {
|
||||
return u.IsAdmin() || (u.Permission>>9)&1 == 1
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ func WebDAVAuth(c *gin.Context) {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
if !user.CanWebdavWrite() && utils.SliceContains([]string{"PUT", "DELETE", "PROPPATCH", "MKCOL", "COPY", "MOVE"}, c.Request.Method) {
|
||||
if !user.CanWebdavManage() && utils.SliceContains([]string{"PUT", "DELETE", "PROPPATCH", "MKCOL", "COPY", "MOVE"}, c.Request.Method) {
|
||||
if c.Request.Method == "OPTIONS" {
|
||||
c.Set("user", guest)
|
||||
c.Next()
|
||||
|
Loading…
x
Reference in New Issue
Block a user