[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class ReleephWorkCanPushConduitAPIMethod extends ReleephConduitAPIMethod { 4 5 public function getAPIMethodName() { 6 return 'releephwork.canpush'; 7 } 8 9 public function getMethodStatus() { 10 return self::METHOD_STATUS_UNSTABLE; 11 } 12 13 public function getMethodDescription() { 14 return 'Return whether the conduit user is allowed to push.'; 15 } 16 17 public function defineParamTypes() { 18 return array( 19 'projectPHID' => 'required string', 20 ); 21 } 22 23 public function defineReturnType() { 24 return 'bool'; 25 } 26 27 public function defineErrorTypes() { 28 return array(); 29 } 30 31 protected function execute(ConduitAPIRequest $request) { 32 $releeph_project = id(new ReleephProject()) 33 ->loadOneWhere('phid = %s', $request->getValue('projectPHID')); 34 $user = $request->getUser(); 35 return $releeph_project->isAuthoritative($user); 36 } 37 38 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |