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:
committed by
joshuaspence
parent
4d13b6c6a8
commit
98a301a59b
@@ -97,7 +97,10 @@ final class HarbormasterStepViewController extends HarbormasterController {
|
|||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setObject($step);
|
->setObject($step);
|
||||||
|
|
||||||
$can_edit = true;
|
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||||
|
$viewer,
|
||||||
|
$step,
|
||||||
|
PhabricatorPolicyCapability::CAN_EDIT);
|
||||||
|
|
||||||
$list->addAction(
|
$list->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
|
|||||||
Reference in New Issue
Block a user