1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

Conditionally backup/restore dmz_config

This commit is contained in:
Harvey Kandola 2018-11-11 16:54:11 +00:00
parent 0a64afd6b5
commit c0e1bd5045
2 changed files with 10 additions and 6 deletions

View file

@ -136,9 +136,11 @@ func (r *restoreHandler) PerformRestore(b []byte, l int64) (err error) {
}
// Config.
err = r.dmzConfig()
if err != nil {
return
if r.Context.GlobalAdmin {
err = r.dmzConfig()
if err != nil {
return
}
}
// Audit Log.
@ -1649,8 +1651,7 @@ func (r *restoreHandler) dmzUser() (err error) {
err = errors.Wrap(err, fmt.Sprintf("unable to check email %s", u[i].Email))
return
}
// Existing userID from database overrides all incoming userID values
// by using remapUser().
// Existing userID from database overrides all incoming userID values by using remapUser().
if len(userID) > 0 {
r.MapUserID[u[i].RefID] = userID
insert = false