@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow to push revisions to review by himself to Differential (bug T1879, change 1/2, Differential part)

Summary: Checks if the revision author is in reviewers only if differential.allow-self-accept is false.

Test Plan:
Tested locally pushing revisions with "arc diff" to a Phabricator
server with differential.allow-self-accept at true or false with
myself or not as reviewer.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1879

Differential Revision: https://secure.phabricator.com/D3673

authored by

Dereckson and committed by
epriestley
b7b783d7 8798d218

+4 -1
+4 -1
src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php
··· 61 61 } 62 62 63 63 public function validateField() { 64 - if (in_array($this->getUser()->getPHID(), $this->reviewers)) { 64 + $allow_self_accept = PhabricatorEnv::getEnvConfig( 65 + 'differential.allow-self-accept', false); 66 + if (!$allow_self_accept 67 + && in_array($this->getUser()->getPHID(), $this->reviewers)) { 65 68 $this->error = 'Invalid'; 66 69 throw new DifferentialFieldValidationException( 67 70 "You may not review your own revision!");