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

Restrict PhortuneMerchant creation at EditEngine level

Summary: Ref T12685. Checks merchant capabilities at the edit engine level

Test Plan: Test with and without admin level permissions. Get restricted access if I cheat. Still able to create with admin.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12685

Differential Revision: https://secure.phabricator.com/D17852
This commit is contained in:
Chad Little 2017-05-08 15:25:36 -07:00
parent c505876d61
commit 32af1d9a9f

View file

@ -65,6 +65,11 @@ final class PhortuneMerchantEditEngine
return false;
}
protected function getCreateNewObjectPolicy() {
return $this->getApplication()->getPolicy(
PhortuneMerchantCapability::CAPABILITY);
}
protected function buildCustomEditFields($object) {
$viewer = $this->getViewer();