Skip to content

Commit 7eccfe3

Browse files
committed
fix: all projects challenges
1 parent 41329e1 commit 7eccfe3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/actions/challenges.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import {
5757
} from '../config/constants'
5858
import { loadProject } from './projects'
5959
import { removeChallengeFromPhaseProduct, saveChallengeAsPhaseProduct } from '../services/projects'
60-
import { checkAdmin } from '../util/tc'
60+
import { checkAdmin, checkManager } from '../util/tc'
6161

6262
/**
6363
* Member challenges related redux actions
@@ -159,7 +159,11 @@ export function loadChallengesByPage (
159159
filters['projectId'] = projectId
160160
} else if (_.isObject(projectId) && projectId.value > 0) {
161161
filters['projectId'] = projectId.value
162-
} else if (!checkAdmin(getState().auth.token) && userId) {
162+
} else if (
163+
!checkAdmin(getState().auth.token) &&
164+
!checkManager(getState().auth.token) &&
165+
userId
166+
) {
163167
// Note that we only add the memberId field if *no* project ID is given,
164168
// so that the list of *all challenges shows only those that the member is on
165169
filters['memberId'] = userId

0 commit comments

Comments
 (0)