1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

Restrict Workboard initialization to CAN_EDIT

Summary: Make Workboard initialization more restrictive.

Test Plan: Log out, see "No Workboard", Log in with permissions, see "New Workboard", Log in with notchad, see "No Workboard".

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T7410

Differential Revision: https://secure.phabricator.com/D14306
This commit is contained in:
Chad Little 2015-10-19 13:22:13 -07:00
parent 267e718dfe
commit ec485de8f9

View file

@ -67,7 +67,11 @@ final class PhabricatorProjectBoardViewController
// TODO: Expand the checks here if we add the ability
// to hide the Backlog column
if (!$columns) {
if (!$viewer->isLoggedIn()) {
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$project,
PhabricatorPolicyCapability::CAN_EDIT);
if (!$can_edit) {
return $this->noAccessDialog($project);
}
switch ($request->getStr('initialize-type')) {