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