mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
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
This commit is contained in:
parent
4458fb6f8f
commit
7126025fe6
2 changed files with 18 additions and 7 deletions
|
@ -21,12 +21,17 @@ final class PhabricatorProjectMembersAddController
|
|||
}
|
||||
|
||||
$this->setProject($project);
|
||||
$done_uri = "/project/members/{$id}/";
|
||||
|
||||
if (!$project->supportsEditMembers()) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
$copy = pht('Parent projects and milestones do not support adding '.
|
||||
'members. You can add members directly to any non-parent subproject.');
|
||||
|
||||
$done_uri = "/project/members/{$id}/";
|
||||
return $this->newDialog()
|
||||
->setTitle(pht('Unsupported Project'))
|
||||
->appendParagraph($copy)
|
||||
->addCancelButton($done_uri);
|
||||
}
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
$member_phids = $request->getArr('memberPHIDs');
|
||||
|
|
|
@ -32,12 +32,18 @@ final class PhabricatorProjectUpdateController
|
|||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
if (!$project->supportsEditMembers()) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$done_uri = "/project/members/{$id}/";
|
||||
|
||||
if (!$project->supportsEditMembers()) {
|
||||
$copy = pht('Parent projects and milestones do not support adding '.
|
||||
'members. You can add members directly to any non-parent subproject.');
|
||||
|
||||
return $this->newDialog()
|
||||
->setTitle(pht('Unsupported Project'))
|
||||
->appendParagraph($copy)
|
||||
->addCancelButton($done_uri);
|
||||
}
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
$edge_action = null;
|
||||
switch ($action) {
|
||||
|
|
Loading…
Reference in a new issue