feat: ftp server support (#7634 close #1898)

* feat: ftp server support

* fix(ftp): incorrect mode for dirs in LIST returns
This commit is contained in:
KirCute_ECT
2024-12-10 20:17:46 +08:00
committed by GitHub
parent 7341846499
commit 650b03aeb1
13 changed files with 835 additions and 2 deletions

View File

@ -117,6 +117,14 @@ func (u *User) CanWebdavManage() bool {
return u.IsAdmin() || (u.Permission>>9)&1 == 1
}
func (u *User) CanFTPAccess() bool {
return (u.Permission>>10)&1 == 1
}
func (u *User) CanFTPManage() bool {
return (u.Permission>>11)&1 == 1
}
func (u *User) JoinPath(reqPath string) (string, error) {
return utils.JoinBasePath(u.BasePath, reqPath)
}