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:
parent
fb193ce9f9
commit
c94fd9cfcf
3 changed files with 19 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue