Skip to content
Snippets Groups Projects
Commit 0b8eaa04 authored by Sebastian's avatar Sebastian
Browse files

add draft status

parent 30854908
No related branches found
No related tags found
1 merge request!6Agree/Decline to work on a manuscript
const omit = require('lodash/omit')
const config = require('config')
const get = require('lodash/get')
const statuses = config.get('statuses')
......@@ -12,7 +13,8 @@ module.exports = {
}
},
setPublicStatuses: (coll, matchingCollPerm) => {
coll.visibleStatus = statuses[coll.status].public
const status = get(coll, 'status') || 'draft'
coll.visibleStatus = statuses[status].public
if (!publicStatusesPermissions.includes(matchingCollPerm.permission)) {
coll.visibleStatus = statuses[coll.status].private
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment