Skip to content

Commit 2d5b59b

Browse files
author
epriestley
committed
Move policy config to "Policy" app and make policy.allow-public description scarier
Summary: Ref T603. We have a real policy app now, so put the config options there. Revise the description of the public policy switch to make it clear that enabling it immediately opens up the user directory and various other interfaces. Test Plan: Viewed/edited config setting. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7154
1 parent efc8373 commit 2d5b59b

File tree

3 files changed

+45
-37
lines changed

3 files changed

+45
-37
lines changed

src/__phutil_library_map__.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@
14581458
'PhabricatorPolicyAwareQuery' => 'infrastructure/query/policy/PhabricatorPolicyAwareQuery.php',
14591459
'PhabricatorPolicyAwareTestQuery' => 'applications/policy/__tests__/PhabricatorPolicyAwareTestQuery.php',
14601460
'PhabricatorPolicyCapability' => 'applications/policy/constants/PhabricatorPolicyCapability.php',
1461-
'PhabricatorPolicyConfigOptions' => 'applications/config/option/PhabricatorPolicyConfigOptions.php',
1461+
'PhabricatorPolicyConfigOptions' => 'applications/policy/config/PhabricatorPolicyConfigOptions.php',
14621462
'PhabricatorPolicyConstants' => 'applications/policy/constants/PhabricatorPolicyConstants.php',
14631463
'PhabricatorPolicyController' => 'applications/policy/controller/PhabricatorPolicyController.php',
14641464
'PhabricatorPolicyDataTestCase' => 'applications/policy/__tests__/PhabricatorPolicyDataTestCase.php',

src/applications/config/option/PhabricatorPolicyConfigOptions.php

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
final class PhabricatorPolicyConfigOptions
4+
extends PhabricatorApplicationConfigOptions {
5+
6+
public function getName() {
7+
return pht("Policy");
8+
}
9+
10+
public function getDescription() {
11+
return pht("Options relating to object visibility.");
12+
}
13+
14+
public function getOptions() {
15+
return array(
16+
$this->newOption('policy.allow-public', 'bool', false)
17+
->setBoolOptions(
18+
array(
19+
pht('Allow Public Visibility'),
20+
pht('Require Login')))
21+
->setSummary(pht("Allow users to set object visibility to public."))
22+
->setDescription(
23+
pht(
24+
"Phabricator allows you to set the visibility of objects (like ".
25+
"repositories and tasks) to 'Public', which means **anyone ".
26+
"on the internet can see them, without needing to log in or ".
27+
"have an account**.".
28+
"\n\n".
29+
"This is intended for open source projects. Many installs will ".
30+
"never want to make anything public, so this policy is disabled ".
31+
"by default. You can enable it here, which will let you set the ".
32+
"policy for objects to 'Public'.".
33+
"\n\n".
34+
"Enabling this setting will immediately open up some features, ".
35+
"like the user directory. Anyone on the internet will be able to ".
36+
"access these features.".
37+
"\n\n".
38+
"With this setting disabled, the 'Public' policy is not ".
39+
"available, and the most open policy is 'All Users' (which means ".
40+
"users must have accounts and be logged in to view things).")),
41+
);
42+
}
43+
44+
}

0 commit comments

Comments
 (0)