Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel

This commit is contained in:
SachaG 2018-03-05 09:52:43 +09:00
commit 19c377e524

View file

@ -27,9 +27,7 @@ export const getDefaultMutations = (collectionName, options = {}) => {
if (options.newCheck) {
return options.newCheck(user, document);
}
// if user is not logged in, disallow operation
if (!user) return false;
// else, check if they can perform "foo.new" operation (e.g. "movies.new")
// check if they can perform "foo.new" operation (e.g. "movies.new")
return Users.canDo(user, `${collectionName.toLowerCase()}.new`);
},
@ -244,4 +242,4 @@ const registerCollectionCallbacks = collectionName => {
returns: null,
description: `Perform operations on a document after it's removed from the database asynchronously.`
});
}
}