Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99372002
PhabricatorProjectsPolicyRule.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
Thu, Jan 23, 23:12
Size
564 B
Mime Type
text/x-php
Expires
Sat, Jan 25, 23:12 (2 d)
Engine
blob
Format
Raw Data
Handle
23744697
Attached To
rPH Phabricator
PhabricatorProjectsPolicyRule.php
View Options
<?php
final
class
PhabricatorProjectsPolicyRule
extends
PhabricatorProjectsBasePolicyRule
{
public
function
getRuleDescription
()
{
return
pht
(
'members of any project'
);
}
public
function
applyRule
(
PhabricatorUser
$viewer
,
$value
,
PhabricatorPolicyInterface
$object
)
{
$memberships
=
$this
->
getMemberships
(
$viewer
->
getPHID
());
foreach
(
$value
as
$project_phid
)
{
if
(
isset
(
$memberships
[
$project_phid
]))
{
return
true
;
}
}
return
false
;
}
public
function
getRuleOrder
()
{
return
200
;
}
}
Event Timeline
Log In to Comment