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

Exclude draft versions from non-lifecycle users

Only show draft documents to those with lifecycle permissions.

Closes #242
This commit is contained in:
Harvey Kandola 2019-04-15 13:23:41 +01:00
parent 2fffb7869e
commit e10d04d22e
5 changed files with 753 additions and 734 deletions

View file

@ -316,7 +316,7 @@ func (s Store) GetVersions(ctx domain.RequestContext, groupID string) (v []doc.V
v = []doc.Version{}
err = s.Runtime.Db.Select(&v, s.Bind(`
SELECT c_versionid AS versionid, c_refid As documentid
SELECT c_versionid AS versionid, c_refid As documentid, c_lifecycle AS lifecycle
FROM dmz_doc
WHERE c_orgid=? AND c_groupid=?
ORDER BY c_versionorder`),