|
|
@@ -87,6 +87,7 @@ module.exports = options => {
|
|
|
const changePlanAuditorsId = this.helper._.map(changePlanAuditors, 'aid');
|
|
|
const tenderPermission = this.session.sessionUser.permission ? this.session.sessionUser.permission.tender : null;
|
|
|
const isTenderTourist = yield this.service.tenderTourist.getDataByCondition({ tid: tender.id, user_id: accountId });
|
|
|
+ const scheduleUser = subProject.page_show.xxjd ? yield this.service.scheduleAudit.getDataByCondition({ tid: tender.id, audit_id: this.session.sessionUser.accountId }) : [];
|
|
|
// 判断访问人是否具有游客身份
|
|
|
tender.isTourist = isTenderTourist !== null;
|
|
|
// 游客权限
|
|
|
@@ -98,7 +99,8 @@ module.exports = options => {
|
|
|
reviseAuditorsId.indexOf(accountId) === -1 && materialAuditorsId.indexOf(accountId) === -1 &&
|
|
|
changeProjectAuditorsId.indexOf(accountId) === -1 && changeProjectXsAuditorsId.indexOf(accountId) === -1 &&
|
|
|
changeApplyAuditorsId.indexOf(accountId) === -1 && changePlanAuditorsId.indexOf(accountId) === -1 &&
|
|
|
- advanceAuditorsId.indexOf(accountId) === -1 && !this.session.sessionUser.is_admin && !isTenderTourist) {
|
|
|
+ advanceAuditorsId.indexOf(accountId) === -1 && !this.session.sessionUser.is_admin && !isTenderTourist &&
|
|
|
+ (!scheduleUser || scheduleUser.permission === scPermission.no)) {
|
|
|
throw '您无权查看该项目';
|
|
|
}
|
|
|
|
|
|
@@ -113,7 +115,6 @@ module.exports = options => {
|
|
|
if (this.session.sessionUser.accountId === tender.data.user_id) {
|
|
|
schedule_permission = scPermission.edit;
|
|
|
} else {
|
|
|
- const scheduleUser = yield this.service.scheduleAudit.getDataByCondition({ tid: tender.id, audit_id: this.session.sessionUser.accountId });
|
|
|
if (scheduleUser) {
|
|
|
if (tender.isTourist && scheduleUser.permission === scPermission.no) {
|
|
|
schedule_permission = scPermission.show;
|