添加了快照功能支持,支持定时快照和回滚快照

This commit is contained in:
MengMengCode
2026-06-06 09:24:19 +08:00
parent bb8a646de7
commit a9784539ea
17 changed files with 1352 additions and 40 deletions
+6
View File
@@ -377,6 +377,12 @@ func isSubUserContainerActionAllowed(action string, method string) bool {
switch {
case action == "usage" || action == "traffic" || action == "random-port":
return method == http.MethodGet
case action == "snapshots":
return method == http.MethodGet || method == http.MethodPost
case action == "snapshots/schedule":
return method == http.MethodPost
case strings.HasPrefix(action, "snapshots/"):
return method == http.MethodDelete || method == http.MethodPost
case action == "start" || action == "stop" || action == "restart" || action == "reinstall":
return method == http.MethodPost
case strings.HasPrefix(action, "port-mappings/"):