feat(multi-home): enable separated home dir for each user (#64)

* feat(files): make files service supporting home dir

* fix(files): add path access control and avoid redirecting path in the backend

* feat(files): add ListHome API

* fix(server): fix access control issues

* feat(client/web): support multi-home

* feat(server): cleanup

* fix(server): failed to init admin folder
This commit is contained in:
Hexxa 2021-07-24 21:05:36 -05:00 committed by GitHub
parent 9748d0cab4
commit 81da97650b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 527 additions and 212 deletions

View file

@ -2,7 +2,7 @@ package server
import (
"io/ioutil"
"path"
// "path"
"time"
"github.com/ihexxa/gocfg"
@ -51,8 +51,8 @@ func waitForReady(addr string) bool {
return false
}
func compareFileContent(fs fspkg.ISimpleFS, filePath string, expectedContent string) (bool, error) {
reader, err := fs.GetFileReader(path.Join("files", filePath))
func compareFileContent(fs fspkg.ISimpleFS, uid, filePath string, expectedContent string) (bool, error) {
reader, err := fs.GetFileReader(filePath)
if err != nil {
return false, err
}