@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.

Followup from D11358#106424 and make policy.locked fully work

Summary: Fast commit. Also forgot to make the config override the existing policy. I *think* this is the right spot and we're good? Ref T6947.

Test Plan: viewed the application settings page for people application and saw the correct overrode setting.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6947

Differential Revision: https://secure.phabricator.com/D11373

+8 -3
+5
src/applications/base/PhabricatorApplication.php
··· 454 454 return null; 455 455 } 456 456 457 + $policy_locked = PhabricatorEnv::getEnvConfig('policy.locked'); 458 + if (isset($policy_locked[$capability])) { 459 + return $policy_locked[$capability]; 460 + } 461 + 457 462 return idx($policy, $capability); 458 463 } 459 464
+2 -3
src/applications/meta/controller/PhabricatorApplicationEditController.php
··· 115 115 ->setUser($user); 116 116 117 117 $locked_policies = PhabricatorEnv::getEnvConfig('policy.locked'); 118 - $locked_map = array_fill_keys($locked_policies, true); 119 118 foreach ($application->getCapabilities() as $capability) { 120 119 $label = $application->getCapabilityLabel($capability); 121 120 $can_edit = $application->isCapabilityEditable($capability); 122 - $locked = idx($locked_map, $capability); 121 + $locked = idx($locked_policies, $capability); 123 122 $caption = $application->getCapabilityCaption($capability); 124 123 125 124 if (!$can_edit || $locked) { ··· 132 131 $form->appendChild( 133 132 id(new AphrontFormPolicyControl()) 134 133 ->setUser($user) 135 - ->setDisabled(idx($locked_map, $capability)) 134 + ->setDisabled($locked) 136 135 ->setCapability($capability) 137 136 ->setPolicyObject($application) 138 137 ->setPolicies($policies)
+1
src/applications/policy/config/PhabricatorPolicyConfigOptions.php
··· 46 46 "available, and the most open policy is 'All Users' (which means ". 47 47 "users must have accounts and be logged in to view things).")), 48 48 $this->newOption('policy.locked', $policy_locked_type, array()) 49 + ->setLocked(true) 49 50 ->setSummary(pht( 50 51 'Lock specific application policies so they can not be edited.')) 51 52 ->setDescription(pht(