Skip to content

Commit

Permalink
If shepherd_hide is true, then not all PC can see shepherds
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Dec 3, 2024
1 parent cf060c1 commit d8a391a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -3793,16 +3793,20 @@ function can_view_shepherd(?PaperInfo $prow) {
// XXX Allow shepherd view when outcome == 0 && can_view_decision.
// This is a mediocre choice, but people like to reuse the shepherd field
// for other purposes, and I might hear complaints.
if ($prow) {
return $this->act_pc($prow)
|| (!$this->conf->setting("shepherd_hide")
&& $this->can_view_decision($prow)
&& $this->can_view_submitted_review($prow));
} else {
if (!$prow) {
return $this->isPC
|| (!$this->conf->setting("shepherd_hide")
&& $this->can_view_some_decision());
}
$rights = $this->rights($prow);
return $rights->can_administer()
|| $prow->shepherdContactId === $this->contactXid
|| ($this->conf->setting("shepherd_hide")
? ($rights->allow_pc() || $rights->is_reviewer())
&& $this->can_view_review_identity($prow, null)
: $rights->allow_pc()
|| ($this->can_view_decision($prow)
&& $this->can_view_submitted_review($prow)));
}

/** @param PaperInfo $prow
Expand Down

0 comments on commit d8a391a

Please sign in to comment.