fix(auth): 修复企业账户权限验证中的租户ID匹配问题
parent
5ff54cd8b5
commit
27b5b33f12
|
|
@ -77,7 +77,7 @@ public class CurriculumQueryExe {
|
|||
//如果是企业,可以看本企业下所有的,如果是个人,只能看个人的,判断登录的账号是企业主账号还是个人
|
||||
Boolean isCorpAccount = corpInfoRepository.checkCorp();
|
||||
// 企业账户:检查租户ID匹配
|
||||
if (isCorpAccount && AuthContext.getTenantId().equals(videoCoursewareCO.getTenantId())) {
|
||||
if (isCorpAccount && AuthContext.getTenantId().equals(videoCoursewareCO.getCorpinfoId())) {
|
||||
videoCoursewareCO.setIsUserCreate(true);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class ExamPaperQueryExe {
|
|||
Boolean isCorpAccount = corpInfoRepository.checkCorp();
|
||||
|
||||
// 企业账户:检查租户ID匹配
|
||||
if (isCorpAccount && AuthContext.getTenantId().equals(videoCoursewareCO.getTenantId())) {
|
||||
if (isCorpAccount && AuthContext.getTenantId().equals(videoCoursewareCO.getCorpinfoId())) {
|
||||
videoCoursewareCO.setIsUserCreate(true);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class VideoCoursewareQueryExe {
|
|||
Boolean isCorpAccount = corpInfoRepository.checkCorp();
|
||||
|
||||
// 企业账户:检查租户ID匹配
|
||||
if (isCorpAccount && AuthContext.getTenantId().equals(videoCoursewareCO.getTenantId())) {
|
||||
if (isCorpAccount && AuthContext.getTenantId().equals(videoCoursewareCO.getCorpinfoId())) {
|
||||
videoCoursewareCO.setIsUserCreate(true);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class ClassQueryExe {
|
|||
examCenterCOS.stream().forEach(classCO -> {
|
||||
//如果是教师,只能维护本人创建的数据,
|
||||
// 企业账户:检查租户ID匹配
|
||||
if (checkCorp && AuthContext.getTenantId().equals(classCO.getTenantId())) {
|
||||
if (checkCorp && AuthContext.getTenantId().equals(classCO.getCorpinfoId())) {
|
||||
classCO.setIsUserCreate(true);
|
||||
}
|
||||
// 个人账户:检查创建者ID匹配
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ public class CurriculumUpdateExe {
|
|||
//如果是企业,可以看本企业下所有的,如果是个人,只能看个人的,判断登录的账号是企业主账号还是个人
|
||||
Boolean isCorpAccount = corpInfoRepository.checkCorp();
|
||||
// 企业账户:检查租户ID匹配
|
||||
if (isCorpAccount && !AuthContext.getTenantId().equals(curriculumDO.getTenantId())) {
|
||||
if (isCorpAccount && !AuthContext.getTenantId().equals(curriculumDO.getCorpinfoId())) {
|
||||
errorList.add(curriculumDO.getCurriculumName()+"课程不是本企业的");
|
||||
}
|
||||
// 个人账户:检查创建者ID匹配
|
||||
|
|
|
|||
Loading…
Reference in New Issue