mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel
This commit is contained in:
commit
19c377e524
1 changed files with 2 additions and 4 deletions
|
@ -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.`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue