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

New spaces to result in live documents

Ensure community edition users do not see Draft document lifecycle.
This commit is contained in:
sauls8t 2018-05-10 15:12:17 +01:00
parent c94fd9cfcf
commit 0f87d5b07e

View file

@ -39,6 +39,7 @@ import (
"github.com/documize/community/model/page" "github.com/documize/community/model/page"
"github.com/documize/community/model/permission" "github.com/documize/community/model/permission"
"github.com/documize/community/model/space" "github.com/documize/community/model/space"
wf "github.com/documize/community/model/workflow"
uuid "github.com/nu7hatch/gouuid" uuid "github.com/nu7hatch/gouuid"
) )
@ -97,9 +98,9 @@ func (h *Handler) Add(w http.ResponseWriter, r *http.Request) {
sp.Name = model.Name sp.Name = model.Name
sp.RefID = uniqueid.Generate() sp.RefID = uniqueid.Generate()
sp.OrgID = ctx.OrgID sp.OrgID = ctx.OrgID
sp.Type = space.ScopePrivate
sp.UserID = ctx.UserID sp.UserID = ctx.UserID
sp.Type = space.ScopePrivate sp.Type = space.ScopePrivate
sp.Lifecycle = wf.LifecycleLive
err = h.Store.Space.Add(ctx, sp) err = h.Store.Space.Add(ctx, sp)
if err != nil { if err != nil {