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

@ -15,6 +15,8 @@ type UsersCfg struct {
CookieTTL int `json:"cookieTTL" yaml:"cookieTTL"`
CookieSecure bool `json:"cookieSecure" yaml:"cookieSecure"`
CookieHttpOnly bool `json:"cookieHttpOnly" yaml:"cookieHttpOnly"`
MinUserNameLen int `json:"minUserNameLen" yaml:"minUserNameLen"`
MinPwdLen int `json:"minPwdLen" yaml:"minPwdLen"`
}
type Secrets struct {
@ -56,6 +58,8 @@ func DefaultConfig() (string, error) {
CookieTTL: 3600 * 24 * 7, // 1 week
CookieSecure: false,
CookieHttpOnly: true,
MinUserNameLen: 4,
MinPwdLen: 6,
},
Secrets: &Secrets{
TokenSecret: "",