Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99057005
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
Sat, Jan 18, 18:56
Size
568 B
Mime Type
text/x-php
Expires
Mon, Jan 20, 18:56 (2 d)
Engine
blob
Format
Raw Data
Handle
23698636
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