@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.

Add information dialogs to adding project members if unsupported

Summary: If you try to join or add members to a parent project, we currently return 404. This instead adds an informational dialog. Fixes T11055

Test Plan: Click on Join Project and Add Members while on a Parent Project or Milestone.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11055

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

+17 -6
+8 -3
src/applications/project/controller/PhabricatorProjectMembersAddController.php
··· 21 21 } 22 22 23 23 $this->setProject($project); 24 + $done_uri = "/project/members/{$id}/"; 24 25 25 26 if (!$project->supportsEditMembers()) { 26 - return new Aphront404Response(); 27 + $copy = pht('Parent projects and milestones do not support adding '. 28 + 'members. You can add members directly to any non-parent subproject.'); 29 + 30 + return $this->newDialog() 31 + ->setTitle(pht('Unsupported Project')) 32 + ->appendParagraph($copy) 33 + ->addCancelButton($done_uri); 27 34 } 28 - 29 - $done_uri = "/project/members/{$id}/"; 30 35 31 36 if ($request->isFormPost()) { 32 37 $member_phids = $request->getArr('memberPHIDs');
+9 -3
src/applications/project/controller/PhabricatorProjectUpdateController.php
··· 32 32 return new Aphront404Response(); 33 33 } 34 34 35 + $done_uri = "/project/members/{$id}/"; 36 + 35 37 if (!$project->supportsEditMembers()) { 36 - return new Aphront404Response(); 37 - } 38 + $copy = pht('Parent projects and milestones do not support adding '. 39 + 'members. You can add members directly to any non-parent subproject.'); 38 40 39 - $done_uri = "/project/members/{$id}/"; 41 + return $this->newDialog() 42 + ->setTitle(pht('Unsupported Project')) 43 + ->appendParagraph($copy) 44 + ->addCancelButton($done_uri); 45 + } 40 46 41 47 if ($request->isFormPost()) { 42 48 $edge_action = null;