4856-worker.time-control #1375
|
@ -47,6 +47,10 @@ module.exports = Self => {
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
|
const isHimself = userId == args.workerId;
|
||||||
|
if (!isHimself)
|
||||||
|
throw new UserError(`You don't have enough privileges`);
|
||||||
|
|
||||||
const workerTimeControlMail = await models.WorkerTimeControlMail.findOne({
|
const workerTimeControlMail = await models.WorkerTimeControlMail.findOne({
|
||||||
where: {
|
where: {
|
||||||
workerFk: args.workerId,
|
workerFk: args.workerId,
|
||||||
|
|
Loading…
Reference in New Issue