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

Enforce non-draft mode lifecycle for CE

Closes #151 by enforcing non-draft mode settings for Community Edition.
This commit is contained in:
sauls8t 2018-05-10 15:10:15 +01:00
parent fb193ce9f9
commit c94fd9cfcf
3 changed files with 19 additions and 2 deletions

View file

@ -316,7 +316,12 @@ func (h *Handler) Use(w http.ResponseWriter, r *http.Request) {
d.LabelID = folderID
d.UserID = ctx.UserID
d.Title = docTitle
d.Lifecycle = sp.Lifecycle
if h.Runtime.Product.Edition == env.CommunityEdition {
d.Lifecycle = workflow.LifecycleLive
} else {
d.Lifecycle = sp.Lifecycle
}
err = h.Store.Document.Add(ctx, d)
if err != nil {