Home GnuPG

Use extended policies in Differential diffs
65c1c758ed26Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Use extended policies in Differential diffs

Summary:
Fixes T9648. Diffs currently use return $this->getRevision()->getViewPolicy(); to inherit their revision's view policy.

After the introduction of object policies, this is wrong for policies like "Subscribers", because it means "Subscribers to this object, the diff". Since Diffs have no subscribers, this always fails.

Instead, use extended policies so that the object policy evaluates in the context of the correct object (the revision).

Test Plan:

  • Create a revision.
  • Subscribe alice to it.
  • Set view policy to "Subscribers".
  • View revision as alice.
  • Before patch: nonsense fatal about missing diff because of policy error.
  • After patch: alice can see the revision.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9648

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

Details

Provenance
epriestley <git@epriestley.com>Authored on Jan 1 2017, 5:36 PM
Parents
rPHAB81e2a1cf6b22: Always parse the first line of a commit message as a title
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHAB65c1c758ed26: Use extended policies in Differential diffs (authored by epriestley <git@epriestley.com>).Jan 1 2017, 6:56 PM