feat(storage): add native PostgreSQL runtime and verified offline application import
Build and publish container images / images (push) Failing after 12m29s
Build and publish container images / images (push) Failing after 12m29s
This commit is contained in:
1 parent
96065d1e89
commit
0ba1dcfef0
243 files changed
+21441
-3090
No files matched your search
@@ -131,14 +131,17 @@ func (s *Server) handleConfig(
|
||||
campusAdminRequired := strings.HasPrefix(section, "campus-") || strings.HasPrefix(section, "domain-") || section == "instance-status"
|
||||
if campusAdminRequired {
|
||||
targetCampusUUID := currentDomain.CampusUUID
|
||||
var targetErr error
|
||||
if section == "domain-create" {
|
||||
targetCampusUUID = r.FormValue("domain_campus_uuid")
|
||||
} else if section == "domain-update" || section == "domain-delete" || section == "domain-entry" || section == "domain-projection" {
|
||||
_ = s.store.DB.QueryRow(`SELECT campus_uuid FROM domains WHERE id=?`, r.FormValue("domain_id")).Scan(&targetCampusUUID)
|
||||
id, _ := strconv.ParseInt(r.FormValue("domain_id"), 10, 64)
|
||||
targetCampusUUID, targetErr = s.store.ConfigTargetCampus(r.Context(), true, id)
|
||||
} else if section != "campus-create" && r.FormValue("campus_id") != "" {
|
||||
_ = s.store.DB.QueryRow(`SELECT uuid FROM campuses WHERE id=?`, r.FormValue("campus_id")).Scan(&targetCampusUUID)
|
||||
id, _ := strconv.ParseInt(r.FormValue("campus_id"), 10, 64)
|
||||
targetCampusUUID, targetErr = s.store.ConfigTargetCampus(r.Context(), false, id)
|
||||
}
|
||||
if !s.store.IsCampusAdmin(targetCampusUUID, principal.UUID) {
|
||||
if targetErr != nil || !s.store.IsCampusAdmin(targetCampusUUID, principal.UUID) {
|
||||
http.Error(w, "campus admin required", http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
@@ -824,6 +827,10 @@ func (s *Server) handleConfig(
|
||||
}
|
||||
|
||||
case "zombie-purge":
|
||||
if !s.store.SupportsZombieGC() {
|
||||
http.Error(w, store.ErrBackendFeatureUnavailable.Error(), http.StatusServiceUnavailable)
|
||||
return
|
||||
}
|
||||
|
||||
_, err = s.store.PurgeZombieObjectsInDomain(
|
||||
r.Context(), domainUUID,
|
||||
@@ -918,7 +925,7 @@ func (s *Server) handleConfig(
|
||||
s.getZombieGraceHours(s.domainUUIDForRequest(r))
|
||||
|
||||
var zombies []store.ZombieObject
|
||||
if r.URL.Query().Get("panel") == "objects" {
|
||||
if r.URL.Query().Get("panel") == "objects" && s.store.SupportsZombieGC() {
|
||||
zombies, err =
|
||||
s.store.ListZombieObjectsInDomain(
|
||||
r.Context(), s.domainUUIDForRequest(r),
|
||||
|
||||
Reference in new issue
Block a user