fix(vm/create): bad resource set condition (#647)

This commit is contained in:
Pierre Donias 2018-01-19 13:02:47 +01:00 committed by Julien Fontanet
parent 9158e33546
commit 8d2bbe86d5

View File

@ -48,7 +48,7 @@ const extract = (obj, prop) => {
export async function create (params) {
const { user } = this
const resourceSet = extract(params, 'resourceSet')
if (resourceSet !== undefined && user.permission !== 'admin') {
if (resourceSet === undefined && user.permission !== 'admin') {
throw unauthorized()
}