Skip to content

Commit 225a38c

Browse files
author
epriestley
committed
Add viewPolicy, editPolicy storage to tasks
Summary: Ref T603. Adds storage for custom policies. Test Plan: Ran storage upgrade. Created and edited tasks. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7118
1 parent 26a226b commit 225a38c

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
2+
ADD viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin;
3+
4+
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
5+
ADD editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin;
6+
7+
UPDATE {$NAMESPACE}_maniphest.maniphest_task
8+
SET viewPolicy = 'users' WHERE viewPolicy = '';
9+
10+
UPDATE {$NAMESPACE}_maniphest.maniphest_task
11+
SET editPolicy = 'users' WHERE editPolicy = '';

src/applications/maniphest/storage/ManiphestTask.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ final class ManiphestTask extends ManiphestDAO
2727
protected $description = '';
2828
protected $originalEmailSource;
2929
protected $mailKey;
30+
protected $viewPolicy = PhabricatorPolicies::POLICY_USER;
31+
protected $editPolicy = PhabricatorPolicies::POLICY_USER;
3032

3133
protected $attached = array();
3234
protected $projectPHIDs = array();

src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,6 +1628,10 @@ public function getPatches() {
16281628
'type' => 'sql',
16291629
'name' => $this->getPatchPath('20130924.mdraftkey.sql'),
16301630
),
1631+
'20130925.mpolicy.sql' => array(
1632+
'type' => 'sql',
1633+
'name' => $this->getPatchPath('20130925.mpolicy.sql'),
1634+
),
16311635
);
16321636
}
16331637
}

0 commit comments

Comments
 (0)