Page MenuHomestyx hydra

ReleephWorkCanPushConduitAPIMethod.php
No OneTemporary

ReleephWorkCanPushConduitAPIMethod.php

<?php
final class ReleephWorkCanPushConduitAPIMethod extends ReleephConduitAPIMethod {
public function getAPIMethodName() {
return 'releephwork.canpush';
}
public function getMethodStatus() {
return self::METHOD_STATUS_UNSTABLE;
}
public function getMethodDescription() {
return 'Return whether the conduit user is allowed to push.';
}
public function defineParamTypes() {
return array(
'projectPHID' => 'required string',
);
}
public function defineReturnType() {
return 'bool';
}
public function defineErrorTypes() {
return array();
}
protected function execute(ConduitAPIRequest $request) {
$releeph_project = id(new ReleephProject())
->loadOneWhere('phid = %s', $request->getValue('projectPHID'));
$user = $request->getUser();
return $releeph_project->isAuthoritative($user);
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Feb 4, 12:27 PM (6 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
695285
Default Alt Text
ReleephWorkCanPushConduitAPIMethod.php (873 B)

Event Timeline