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

Provide Backup/Restore for system and tenant

This commit is contained in:
sauls8t 2018-10-17 14:27:40 +01:00
parent b3383f46ca
commit ec1939c01d
11 changed files with 2128 additions and 780 deletions

View file

@ -13,10 +13,11 @@
package backup
import (
"github.com/documize/community/model/org"
"time"
"github.com/documize/community/core/env"
"github.com/documize/community/model"
"github.com/documize/community/model/org"
)
// Manifest contains backup meta information.
@ -74,4 +75,24 @@ type ImportSpec struct {
// Handle to the current organization being used for restore process.
Org org.Organization
// Was the backup file for a global system backup?
// TRUE if Manifest.Org = "*".
GlobalBackup bool
}
// User represents user object for backup/restore operations.
// We include user specific secrets in such operations.
type User struct {
model.BaseEntity
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Email string `json:"email"`
Initials string `json:"initials"`
Active bool `json:"active"`
GlobalAdmin bool `json:"global"`
Password string `json:"password"`
Salt string `json:"salt"`
Reset string `json:"reset"`
LastVersion string `json:"lastVersion"`
}

View file

@ -16,7 +16,7 @@ import "github.com/documize/community/model"
// Organization defines a company that uses this app.
type Organization struct {
model.BaseEntity
Company string `json:"-"`
Company string `json:"company"`
Title string `json:"title"`
Message string `json:"message"`
Domain string `json:"domain"`
@ -26,6 +26,6 @@ type Organization struct {
AuthConfig string `json:"authConfig"`
ConversionEndpoint string `json:"conversionEndpoint"`
MaxTags int `json:"maxTags"`
Serial string `json:"-"`
Active bool `json:"-"`
Serial string `json:"serial"`
Active bool `json:"active"`
}