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

Add some keys and policy fields to repositories

Summary:
- Add some TODO'd keys.
- Add policy fields.

Test Plan: Viewed repositories; created a new repository and verified it got the right default policy settings.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+26 -4
+20
resources/sql/patches/20130920.repokeyspolicy.sql
··· 1 + ALTER TABLE {$NAMESPACE}_repository.repository_summary 2 + ADD KEY `key_epoch` (epoch); 3 + 4 + ALTER TABLE {$NAMESPACE}_repository.repository 5 + ADD KEY `key_name` (name); 6 + 7 + ALTER TABLE {$NAMESPACE}_repository.repository 8 + ADD KEY `key_vcs` (versionControlSystem); 9 + 10 + ALTER TABLE {$NAMESPACE}_repository.repository 11 + ADD viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin; 12 + 13 + ALTER TABLE {$NAMESPACE}_repository.repository 14 + ADD editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin; 15 + 16 + UPDATE {$NAMESPACE}_repository.repository 17 + SET viewPolicy = 'users' WHERE viewPolicy = ''; 18 + 19 + UPDATE {$NAMESPACE}_repository.repository 20 + SET editPolicy = 'admin' WHERE editPolicy = '';
-4
src/applications/repository/query/PhabricatorRepositoryQuery.php
··· 147 147 148 148 protected function getPagingColumn() { 149 149 150 - // TODO: Add a key for ORDER_NAME. 151 - // TODO: Add a key for ORDER_COMMITTED. 152 - 153 150 $order = $this->order; 154 151 switch ($order) { 155 152 case self::ORDER_CREATED: ··· 290 287 $this->callsigns); 291 288 } 292 289 293 - // TODO: Add a key for this. 294 290 if ($this->types) { 295 291 $where[] = qsprintf( 296 292 $conn_r,
+2
src/applications/repository/storage/PhabricatorRepository.php
··· 29 29 protected $name; 30 30 protected $callsign; 31 31 protected $uuid; 32 + protected $viewPolicy = PhabricatorPolicies::POLICY_USER; 33 + protected $editPolicy = PhabricatorPolicies::POLICY_ADMIN; 32 34 33 35 protected $versionControlSystem; 34 36 protected $details = array();
+4
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1608 1608 'type' => 'php', 1609 1609 'name' => $this->getPatchPath('20130919.mfieldconf.php'), 1610 1610 ), 1611 + '20130920.repokeyspolicy.sql' => array( 1612 + 'type' => 'sql', 1613 + 'name' => $this->getPatchPath('20130920.repokeyspolicy.sql'), 1614 + ), 1611 1615 ); 1612 1616 } 1613 1617 }