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

Put "Push Policy" last in Diffusion, make editing Spaces work

Summary:
Ref T10923.

- The "Policy" edit form currently goes "Push, View, Edit". Reorder the defaults to "View, Edit, Push".
- Editing Spaces doesn't currently work: the element appears in the UI, but isn't actually processed when handling transactions. Make that work.

Test Plan:
- Edited a repository policies, saw "View, Edit, Push".
- Moved a repository between Spaces.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10923

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

+30
+29
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
··· 165 165 return $pages; 166 166 } 167 167 168 + protected function willConfigureFields($object, array $fields) { 169 + // Change the default field order so related fields are adjacent. 170 + $after = array( 171 + 'policy.edit' => array('policy.push'), 172 + ); 173 + 174 + $result = array(); 175 + foreach ($fields as $key => $value) { 176 + $result[$key] = $value; 177 + 178 + if (!isset($after[$key])) { 179 + continue; 180 + } 181 + 182 + foreach ($after[$key] as $next_key) { 183 + if (!isset($fields[$next_key])) { 184 + continue; 185 + } 186 + 187 + unset($result[$next_key]); 188 + $result[$next_key] = $fields[$next_key]; 189 + unset($fields[$next_key]); 190 + } 191 + } 192 + 193 + return $result; 194 + } 195 + 196 + 168 197 protected function buildCustomEditFields($object) { 169 198 $viewer = $this->getViewer(); 170 199
+1
src/applications/diffusion/management/DiffusionRepositoryPoliciesManagementPanel.php
··· 49 49 return array( 50 50 'policy.view', 51 51 'policy.edit', 52 + 'spacePHID', 52 53 'policy.push', 53 54 ); 54 55 }