Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97901039
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 7, 09:07
Size
568 B
Mime Type
text/x-php
Expires
Thu, Jan 9, 09:07 (2 d)
Engine
blob
Format
Raw Data
Handle
23435373
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