Skip to content
Snippets Groups Projects
Commit 3a9b8902 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

Merge branch 'develop' of https://gitlab.coko.foundation/xpub/xpub-faraday into develop

parents 86ae5f8f c6c8abcd
No related branches found
No related tags found
1 merge request!43Sprint #19
const config = require('config') const config = require('config')
const { get, pickBy, last, has } = require('lodash') const { get, pickBy, last, has, pick } = require('lodash')
const statuses = config.get('statuses') const statuses = config.get('statuses')
const helpers = require('./authsome-helpers') const helpers = require('./authsome-helpers')
...@@ -238,7 +238,17 @@ async function applyAuthenticatedUserPolicy(user, operation, object, context) { ...@@ -238,7 +238,17 @@ async function applyAuthenticatedUserPolicy(user, operation, object, context) {
} }
if (get(object, 'type') === 'user' && get(object, 'id') === user.id) { if (get(object, 'type') === 'user' && get(object, 'id') === user.id) {
return true return {
filter: body =>
pick(body, [
'title',
'country',
'lastName',
'firstName',
'affiliation',
'notifications',
]),
}
} }
// allow owner to submit a revision // allow owner to submit a revision
......
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