1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-31 08:58:20 +01:00

Set $can_edit for Harbormaster steps

Summary: Sets the `$can_edit` value correctly (previously it was hardcoded to `true`).

Test Plan: Went to http://phabricator.local/harbormaster/step/view/1/ and saw "Edit Step" disabled.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14373
This commit is contained in:
Joshua Spence 2015-10-31 04:54:16 +00:00 committed by joshuaspence
parent 4d13b6c6a8
commit 98a301a59b

View file

@ -97,7 +97,10 @@ final class HarbormasterStepViewController extends HarbormasterController {
->setUser($viewer)
->setObject($step);
$can_edit = true;
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$step,
PhabricatorPolicyCapability::CAN_EDIT);
$list->addAction(
id(new PhabricatorActionView())