Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/candidate_profile/test/TestPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ that widget (ie. the media module for CandID 587630 (DCC090) or CandID 300001 (M
4. Ensure that, when the module which added the extra `CandidateInfo` terms
is disabled, the terms from that module no longer show up in the
`Candidate Info` card.
5. Ensure that you can always only see visits from projects that you are affiliated with.

All other widgets are part of other modules, and should be tested as
part of that module's testing.
15 changes: 6 additions & 9 deletions modules/timepoint_list/php/timepoint_list.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,12 @@ class Timepoint_List extends \NDB_Menu
},
$listOfSessionIDs,
);

if ($user->hasPermission('access_all_profiles') === false) {
$listOfTimePoints = array_filter(
$listOfTimePoints,
function ($timePoint) use ($user) {
return $timePoint->isAccessibleBy($user);
}
);
}
$listOfTimePoints = array_filter(
$listOfTimePoints,
function ($timePoint) use ($user) {
return $timePoint->isAccessibleBy($user);
}
);

/*
* List of visits
Expand Down
1 change: 1 addition & 0 deletions modules/timepoint_list/test/TestPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- For a candidate of a different site than your user, ensure that either
- `access_all_profiles` permission is required
- or that the candidate's registration site is the same as the user's site
- Ensure that you can always only see visits from projects that you are affiliated with.
2. **Action buttons**
- For a candidate of a different site than your user, attempt to access the timepoint list via the url. The page should load with a message of 'Permission Denied'.
- For a candidate of the same site as your user, there should be up to 3 additional buttons:
Expand Down