7773-testToMaster_2430 #2774
|
@ -1,4 +1,3 @@
|
||||||
const ForbiddenError = require('vn-loopback/util/forbiddenError');
|
|
||||||
const UserError = require('vn-loopback/util/user-error');
|
const UserError = require('vn-loopback/util/user-error');
|
||||||
|
|
||||||
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
|
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
|
||||||
|
@ -37,7 +36,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
const isSupplier = await Self.app.models.Supplier.findById(userId, options);
|
const isSupplier = await Self.app.models.Supplier.findById(userId, myOptions);
|
||||||
if (isSupplier) {
|
if (isSupplier) {
|
||||||
const isEntryOwner = (await Self.findById(id)).supplierFk === userId;
|
const isEntryOwner = (await Self.findById(id)).supplierFk === userId;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue