mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-22 12:41:19 +01:00
Fix a fatal in blame when the viewer can't see a revision because of a permission issue
Summary: Fixes T13040. To reproduce: - View a file with blame enabled, where some line has an associated revision (say, `D123`). - Edit `D123` so it exists and is a valid revision, but the viewer can't see it. - Reload the page. Instead, only add revisions to the map if we actually managed to load them. Test Plan: Page no longer fatals. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13040 Differential Revision: https://secure.phabricator.com/D18884
This commit is contained in:
parent
3038d564a6
commit
86a0c7daa2
1 changed files with 4 additions and 0 deletions
|
@ -947,6 +947,10 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
}
|
||||
|
||||
foreach ($revision_ids as $commit_phid => $revision_id) {
|
||||
// If the viewer can't actually see this revision, skip it.
|
||||
if (!isset($revisions[$revision_id])) {
|
||||
continue;
|
||||
}
|
||||
$revision_map[$commit_map[$commit_phid]] = $revision_id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue