Page MenuHomePhabricator

Paste: Add edit policy
ClosedPublic

Authored by Krenair on Dec 31 2014, 12:40 AM.
Tags
None
Referenced Files
F14051784: D11097.diff
Fri, Nov 15, 3:54 AM
F14043841: D11097.id26641.diff
Tue, Nov 12, 1:23 PM
F14039189: D11097.diff
Mon, Nov 11, 4:25 AM
F14026939: D11097.id26650.diff
Fri, Nov 8, 3:50 AM
F14023325: D11097.diff
Thu, Nov 7, 1:07 AM
F14007337: D11097.id26649.diff
Tue, Oct 29, 4:04 AM
F14004619: D11097.id26649.diff
Sat, Oct 26, 11:52 PM
F13976911: D11097.id26649.diff
Oct 18 2024, 4:16 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
3

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

resources/sql/autopatches/20141230.pasteeditpolicyexisting.sql
3

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

src/applications/paste/capability/PasteDefaultEditCapability.php
12–14

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.