Skip to content

Commit

Permalink
Contact::can_pc_view_paper_track accounts for administrators
Browse files Browse the repository at this point in the history
Sometimes an administrator doesn't have the PC tags to allow PC
viewing.
  • Loading branch information
kohler committed Nov 8, 2024
1 parent 59a325f commit b11ba53
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -3714,10 +3714,11 @@ function perm_view_pdf(PaperInfo $prow) {
function can_pc_view_paper_track(PaperInfo $prow) {
assert($this->isPC);
$rights = $this->rights($prow);
return $rights->allow_pc_broad()
&& $this->conf->time_pc_view($prow, false)
&& (!$this->conf->check_track_view_sensitivity()
|| $this->conf->check_tracks($prow, $this, Track::VIEW));
return $rights->allow_administer()
|| ($rights->allow_pc_broad()
&& $this->conf->time_pc_view($prow, false)
&& (!$this->conf->check_track_view_sensitivity()
|| $this->conf->check_tracks($prow, $this, Track::VIEW)));
}

/** @return bool */
Expand Down

0 comments on commit b11ba53

Please sign in to comment.