Skip to content

Commit

Permalink
#4052 - Admins no longer see all projects in the project overview
Browse files Browse the repository at this point in the history
- Change role filter such that admin users see everything
  • Loading branch information
reckart committed Jun 6, 2023
1 parent 3b163ea commit e94e307
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,11 @@ private static String formatDate(Date aTime)

private List<ProjectEntry> loadProjects()
{
var isAdmin = userRepository.isAdministrator(currentUser.getObject());
return projectService.listAccessibleProjectsWithPermissions(currentUser.getObject())
.entrySet().stream() //
.map(e -> new ProjectEntry(e.getKey(), e.getValue())) //
.filter(e -> e.getLevels().contains(MANAGER)
.filter(e -> isAdmin || e.getLevels().contains(MANAGER)
|| containsAny(e.getLevels(), dashboardProperties.getAccessibleByRoles()))
.sorted(comparing(ProjectEntry::getName)) //
.collect(toList());
Expand Down

0 comments on commit e94e307

Please sign in to comment.