fix(工作台): 修复未按照列表顺序获取默认权限项目问题
--bug=1050600 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001050600
This commit is contained in:
parent
1fe3f4566c
commit
94dc028725
|
@ -497,9 +497,11 @@ public class DashboardService {
|
|||
setPlanId(layoutDTO);
|
||||
if (StringUtils.isBlank(layoutDTO.getPlanId())) {
|
||||
TestPlan latestPlanByProjectIds = extTestPlanMapper.getLatestPlanByProjectIds(hasReadProjectIds);
|
||||
layoutDTO.setPlanId(latestPlanByProjectIds.getId());
|
||||
layoutDTO.setGroupId(latestPlanByProjectIds.getGroupId());
|
||||
layoutDTO.setProjectIds(List.of(latestPlanByProjectIds.getProjectId()));
|
||||
if (latestPlanByProjectIds!=null) {
|
||||
layoutDTO.setPlanId(latestPlanByProjectIds.getId());
|
||||
layoutDTO.setGroupId(latestPlanByProjectIds.getGroupId());
|
||||
layoutDTO.setProjectIds(List.of(latestPlanByProjectIds.getProjectId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.equalsIgnoreCase(layoutDTO.getKey(), DashboardUserLayoutKeys.BUG_COUNT.toString())
|
||||
|
|
|
@ -116,6 +116,9 @@ public class PermissionCheckService {
|
|||
|
||||
for (String projectId : projectIds) {
|
||||
List<UserRolePermission> userRolePermissions = projectPermissionMap.get(projectId);
|
||||
if (CollectionUtils.isEmpty(userRolePermissions)) {
|
||||
continue;
|
||||
}
|
||||
for (UserRolePermission userRolePermission : userRolePermissions) {
|
||||
if (permissions.contains(userRolePermission.getPermissionId())) {
|
||||
permissionProjectIdMap.computeIfAbsent(userRolePermission.getPermissionId(), key -> new LinkedHashSet<>()).add(projectId);
|
||||
|
|
Loading…
Reference in New Issue