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:
parent
b3383f46ca
commit
ec1939c01d
11 changed files with 2128 additions and 780 deletions
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue