Skip to content

Commit 5f18896

Browse files
authored
Merge branch 'development' into add-git-pr-to-contributing
2 parents 2007067 + 7ff04f5 commit 5f18896

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

client/src/pages/ProjectList.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ export default function ProjectList({ auth }) {
4040
async function fetchAllProjects() {
4141
let projectData;
4242

43-
if(user?.accessLevel === 'admin' || user?.accessLevel === 'superadmin') {
43+
if (
44+
user?.accessLevel === 'admin' ||
45+
user?.accessLevel === 'superadmin'
46+
) {
4447
projectData = await projectApiService.fetchProjects();
45-
}
46-
47-
// if user is not admin, but is a project manager, only show projects they manage
48-
if ((user?.accessLevel !== 'admin' || user?.accessLevel !== 'superadmin') && user?.managedProjects.length > 0) {
48+
} else if (user?.managedProjects?.length > 0) {
49+
// if user is not admin, but is a project manager, only show projects they manage
4950
projectData = await projectApiService.fetchPMProjects(user.managedProjects);
5051
}
5152

0 commit comments

Comments
 (0)