mirror of
https://github.com/documize/community.git
synced 2025-07-24 23:59:47 +02:00
Tweaks to backup process permissions
This commit is contained in:
parent
db04057d9e
commit
cee71cb313
7 changed files with 670 additions and 680 deletions
|
@ -158,13 +158,6 @@ func (h *Handler) Restore(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
createUsers, err := strconv.ParseBool(request.Query(r, "users"))
|
||||
if err != nil {
|
||||
h.Runtime.Log.Info("Restore invoked without 'users' parameter")
|
||||
response.WriteMissingDataError(w, method, "users=false/true missing")
|
||||
return
|
||||
}
|
||||
|
||||
filedata, fileheader, err := r.FormFile("restore-file")
|
||||
if err != nil {
|
||||
response.WriteMissingDataError(w, method, "restore-file")
|
||||
|
@ -191,7 +184,7 @@ func (h *Handler) Restore(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
// Prepare context and start restore process.
|
||||
spec := m.ImportSpec{OverwriteOrg: overwriteOrg, CreateUsers: createUsers, Org: org}
|
||||
spec := m.ImportSpec{OverwriteOrg: overwriteOrg, Org: org}
|
||||
rh := restoreHandler{Runtime: h.Runtime, Store: h.Store, Context: ctx, Spec: spec}
|
||||
|
||||
// Run the restore process.
|
||||
|
|
|
@ -101,7 +101,7 @@ func (r *restoreHandler) PerformRestore(b []byte, l int64) (err error) {
|
|||
r.Spec.GlobalBackup = false
|
||||
}
|
||||
|
||||
// Process might require reassignment of ID's so prepare map.
|
||||
// Process might require reassignment of ID values.
|
||||
r.MapOrgID = make(map[string]string)
|
||||
r.MapUserID = make(map[string]string)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue