Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97242299
ReleephWorkCanPushConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jan 3, 17:55
Size
873 B
Mime Type
text/x-php
Expires
Sun, Jan 5, 17:55 (2 d)
Engine
blob
Format
Raw Data
Handle
23362853
Attached To
rPH Phabricator
ReleephWorkCanPushConduitAPIMethod.php
View Options
<?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
);
}
}
Event Timeline
Log In to Comment