Skip to content

Commit dc6a09a

Browse files
committed
PM-858 - limit challenges list
1 parent 4968fc3 commit dc6a09a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/actions/challenges.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +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'
6061

6162
/**
6263
* Member challenges related redux actions
@@ -158,7 +159,7 @@ export function loadChallengesByPage (
158159
filters['projectId'] = projectId
159160
} else if (_.isObject(projectId) && projectId.value > 0) {
160161
filters['projectId'] = projectId.value
161-
} else if (userId) {
162+
} else if (!checkAdmin(getState().auth.token) && userId) {
162163
// Note that we only add the memberId field if *no* project ID is given,
163164
// so that the list of *all challenges shows only those that the member is on
164165
filters['memberId'] = userId

0 commit comments

Comments
 (0)