mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 17:55:24 +02:00
Space Trash-bin expiration cli (#5500)
* add storage-users trash-bin cli add task to clean up outdated trash-bin resources add trash-bin cli purge-expired command to purge expired trash-bin resources add purge-expired task tests
This commit is contained in:
@@ -2,6 +2,7 @@ package defaults
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
@@ -87,6 +88,12 @@ func DefaultConfig() *config.Config {
|
||||
Store: "memory",
|
||||
Database: "users",
|
||||
},
|
||||
Tasks: config.Tasks{
|
||||
PurgeTrashBin: config.PurgeTrashBin{
|
||||
ProjectDeleteBefore: 30 * 24 * time.Hour,
|
||||
PersonalDeleteBefore: 30 * 24 * time.Hour,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +146,10 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
cfg.GRPC.TLS.Key = cfg.Commons.GRPCServiceTLS.Key
|
||||
}
|
||||
}
|
||||
|
||||
if cfg.Tasks.PurgeTrashBin.UserID == "" && cfg.Commons != nil {
|
||||
cfg.Tasks.PurgeTrashBin.UserID = cfg.Commons.AdminUserID
|
||||
}
|
||||
}
|
||||
|
||||
func Sanitize(cfg *config.Config) {
|
||||
|
||||
Reference in New Issue
Block a user