Skip to content

Commit

Permalink
Use hasDependencies flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Rupert Bedford committed May 25, 2016
1 parent 8284a15 commit fba24ee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
}, function(user) {
setCohorts([]);

cohortStore.findMany({isRecruitmentGroup: true}).then(function(cohorts) {
cohortStore.findMany().then(function(cohorts) {
cohorts = _.filter(cohorts, function(x) {
return hasPermissionForGroup(user, x, 'RECRUIT_PATIENT');
return !x.hasDependencies && hasPermissionForGroup(user, x, 'RECRUIT_PATIENT');
});

setCohorts(cohorts);
Expand Down

0 comments on commit fba24ee

Please sign in to comment.