@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+45 -37
+1 -1
src/__phutil_library_map__.php
··· 1458 1458 'PhabricatorPolicyAwareQuery' => 'infrastructure/query/policy/PhabricatorPolicyAwareQuery.php', 1459 1459 'PhabricatorPolicyAwareTestQuery' => 'applications/policy/__tests__/PhabricatorPolicyAwareTestQuery.php', 1460 1460 'PhabricatorPolicyCapability' => 'applications/policy/constants/PhabricatorPolicyCapability.php', 1461 - 'PhabricatorPolicyConfigOptions' => 'applications/config/option/PhabricatorPolicyConfigOptions.php', 1461 + 'PhabricatorPolicyConfigOptions' => 'applications/policy/config/PhabricatorPolicyConfigOptions.php', 1462 1462 'PhabricatorPolicyConstants' => 'applications/policy/constants/PhabricatorPolicyConstants.php', 1463 1463 'PhabricatorPolicyController' => 'applications/policy/controller/PhabricatorPolicyController.php', 1464 1464 'PhabricatorPolicyDataTestCase' => 'applications/policy/__tests__/PhabricatorPolicyDataTestCase.php',
-36
src/applications/config/option/PhabricatorPolicyConfigOptions.php
··· 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 source code) to 'Public', which means anyone ". 26 - "on the internet can see them, even without being logged in. ". 27 - "This is great for open source, but some installs may never want ". 28 - "to make anything public, so this policy is disabled by default. ". 29 - "You can enable it here, which will let you set the policy for ". 30 - "objects to 'Public'. With this option disabled, the most open". 31 - "policy is 'All Users', which means users must be logged in to ". 32 - "view things.")), 33 - ); 34 - } 35 - 36 - }
+44
src/applications/policy/config/PhabricatorPolicyConfigOptions.php
··· 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 + }