浏览代码

权限遗漏

MaiXinRong 4 年之前
父节点
当前提交
8ba54143fa
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/middleware/uncheck_tender_check.js

+ 3 - 2
app/middleware/uncheck_tender_check.js

@@ -23,9 +23,10 @@ module.exports = options => {
     return function* uncheckTenderCheck(next) {
     return function* uncheckTenderCheck(next) {
         try {
         try {
             if (this.tender.data.ledger_status === auditConst.status.uncheck) {
             if (this.tender.data.ledger_status === auditConst.status.uncheck) {
-                if (this.tender.data.user_id !== accountId && this.tender.advanceAuditorsId.indexOf(this.session.sessionUser.accountId) === -1) {
+                if (this.tender.data.user_id !== this.session.sessionUser.accountId
+                    && this.tender.advanceAuditorsId.indexOf(this.session.sessionUser.accountId) === -1) {
                     throw '您无权查看该项目';
                     throw '您无权查看该项目';
-                } else if (this.tender.advanceAuditorsId.indexOf(accountId) !== -1) {
+                } else if (this.tender.advanceAuditorsId.indexOf(this.session.sessionUser.accountId) !== -1) {
                     throw '您无权查看该内容';
                     throw '您无权查看该内容';
                 }
                 }
             }
             }