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

Don't allow logged out users to initialize a Workboard

Summary: Right now logged out users can enable a workboard on a project.

Test Plan: Log out, view a public project, click on Workboard, get not set up dialog. Click Cancel, return to project details.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+17
+17
src/applications/project/controller/PhabricatorProjectBoardViewController.php
··· 67 67 // TODO: Expand the checks here if we add the ability 68 68 // to hide the Backlog column 69 69 if (!$columns) { 70 + if (!$viewer->isLoggedIn()) { 71 + return $this->noAccessDialog($project); 72 + } 70 73 switch ($request->getStr('initialize-type')) { 71 74 case 'backlog-only': 72 75 $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); ··· 708 711 ->addCancelButton($this->getApplicationURI('view/'.$project->getID().'/')) 709 712 ->appendParagraph($instructions) 710 713 ->appendChild($new_selector); 714 + 715 + return id(new AphrontDialogResponse()) 716 + ->setDialog($dialog); 717 + } 718 + 719 + private function noAccessDialog(PhabricatorProject $project) { 720 + 721 + $instructions = pht('This workboard has not been setup yet.'); 722 + 723 + $dialog = id(new AphrontDialogView()) 724 + ->setUser($this->getRequest()->getUser()) 725 + ->setTitle(pht('No Workboard')) 726 + ->addCancelButton($this->getApplicationURI('view/'.$project->getID().'/')) 727 + ->appendParagraph($instructions); 711 728 712 729 return id(new AphrontDialogResponse()) 713 730 ->setDialog($dialog);