Page MenuHomePhabricator

Paste: Add edit policy
ClosedPublic

Authored by Krenair on Dec 31 2014, 12:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 6:22 PM
Unknown Object (File)
Thu, Apr 11, 8:47 AM
Unknown Object (File)
Tue, Apr 2, 1:34 AM
Unknown Object (File)
Mar 5 2024, 4:44 AM
Unknown Object (File)
Feb 7 2024, 11:04 PM
Unknown Object (File)
Feb 5 2024, 2:45 PM
Unknown Object (File)
Jan 10 2024, 6:15 PM
Unknown Object (File)
Jan 10 2024, 6:15 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.