fix(files): cleanups
This commit is contained in:
parent
c864c2bcb5
commit
2b55d5c159
2 changed files with 5 additions and 4 deletions
|
@ -109,7 +109,8 @@ func (h *FileHandlers) canAccess(userName, role, op, path string) bool {
|
||||||
}
|
}
|
||||||
// TODO: improve performance
|
// TODO: improve performance
|
||||||
for i := 1; i <= len(parts); i++ {
|
for i := 1; i <= len(parts); i++ {
|
||||||
_, ok := h.deps.FileInfos().GetSharing(strings.Join(parts[0:i], "/"))
|
prefix := strings.Join(parts[0:i], "/")
|
||||||
|
_, ok := h.deps.FileInfos().GetSharing(prefix)
|
||||||
if ok {
|
if ok {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,9 +71,9 @@ func DefaultConfig() (string, error) {
|
||||||
CaptchaWidth: 256,
|
CaptchaWidth: 256,
|
||||||
CaptchaHeight: 60,
|
CaptchaHeight: 60,
|
||||||
CaptchaEnabled: true,
|
CaptchaEnabled: true,
|
||||||
UploadSpeedLimit: 100 * 1024, // B
|
UploadSpeedLimit: 100 * 1024, // B
|
||||||
DownloadSpeedLimit: 100 * 1024, // B
|
DownloadSpeedLimit: 100 * 1024, // B
|
||||||
SpaceLimit: 1024, // GB
|
SpaceLimit: 1024 * 1024 * 100, // 100MB
|
||||||
LimiterCapacity: 1000,
|
LimiterCapacity: 1000,
|
||||||
LimiterCyc: 1000, // 1s
|
LimiterCyc: 1000, // 1s
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue