...
|
...
|
@@ -1947,6 +1947,8 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ |
|
|
if err == orm.ErrNoRows {
|
|
|
if chance.ReviewStatus != protocol.ReviewStatusPass {
|
|
|
rsp.EditChance = 0
|
|
|
rsp.EditPublicStatus = 0
|
|
|
rsp.EditScore = 0
|
|
|
}
|
|
|
err = nil
|
|
|
return
|
...
|
...
|
@@ -1959,12 +1961,18 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ |
|
|
break
|
|
|
}
|
|
|
}
|
|
|
//审核进行中
|
|
|
if isApproving {
|
|
|
rsp.EditChance = 1
|
|
|
} else if chance.ReviewStatus == protocol.ReviewStatusAuditging && len(auditProcess) > 0 {
|
|
|
rsp.EditChance = 0
|
|
|
log.Debug(fmt.Sprintf("用户:%v 审核过,并且当前机会在审核中 编辑权限:false", header.UserId))
|
|
|
}
|
|
|
if chance.ReviewStatus == protocol.ReviewStatusPass && len(auditProcess) > 0 { //已通过的机会 并且是审批人 有所有编辑权限
|
|
|
rsp.EditChance = 1
|
|
|
rsp.EditPublicStatus = 1
|
|
|
rsp.EditScore = 1
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return
|
...
|
...
|
|