Page MenuHomePhabricator

Paste: Add edit policy
ClosedPublic

Authored by Krenair on Dec 31 2014, 12:40 AM.
Tags
None
Referenced Files
F14477710: D11097.diff
Sat, Dec 28, 3:13 PM
F14475231: D11097.id26649.diff
Fri, Dec 27, 6:14 PM
Unknown Object (File)
Tue, Dec 17, 2:37 PM
Unknown Object (File)
Sun, Dec 8, 12:18 PM
Unknown Object (File)
Sat, Dec 7, 7:23 PM
Unknown Object (File)
Mon, Dec 2, 12:01 PM
Unknown Object (File)
Nov 25 2024, 2:12 PM
Unknown Object (File)
Nov 22 2024, 1:40 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Maniphest Tasks
T5549: Add "Editable by" policy setting to Paste
Commits
Restricted Diffusion Commit
rPa84cd9989398: Paste: Add edit policy
Summary
Test Plan

Set edit policy on paste, check that only users meeting the policy requirements can edit it.

Diff Detail

Repository
rP Phabricator
Branch
T5549
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 3409
Build 3416: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

Krenair retitled this revision from to Paste: Add edit policy.
Krenair updated this object.
Krenair edited the test plan for this revision. (Show Details)
Krenair added a reviewer: epriestley.
epriestley edited edge metadata.

Couple of minor things inline, this looks great overall. Thanks!

resources/sql/autopatches/20141230.pasteeditpolicycolumn.sql
2

This should be NOT NULL for consistency with other policy columns.

resources/sql/autopatches/20141230.pasteeditpolicyexisting.sql
2

Since the column will be NOT NULL, this should be WHERE editPolicy = ''.

src/applications/paste/capability/PasteDefaultEditCapability.php
11–13

Remove this; public edits aren't supported (principally, we don't have a user to attribute the edit to).

src/applications/paste/storage/PhabricatorPaste.php
58

Yeah, just make this policy (which should be the default, so you can omit it).

The policy? spec on viewPolicy is an error that we just haven't cleaned up yet (see T6203).

This revision now requires changes to proceed.Dec 31 2014, 4:01 PM
Krenair edited edge metadata.
  • rm redundant config, set field to not null, don't let edit policy be public
epriestley edited edge metadata.

Nice, thanks!

This revision is now accepted and ready to land.Dec 31 2014, 4:24 PM
This revision was automatically updated to reflect the committed changes.