HomePhabricator

Make HeraldRule implement PhabricatorPolicyInterface

Description

Make HeraldRule implement PhabricatorPolicyInterface

Summary:
Ref T603. Ref T2769. Herald currently interacts with policies in a bad way; specifically, I can create a rule which emails me for everything, and thus learn about objects I can't otherwise see.

This shouldn't be possible, so I'm going to reduce personal rules to have only the viewer's scope.

For global rules, I think I'm always going to let any user edit them, but make who the rule acts as part of the configuration. There will be an option to make a rule omnipotent, but only admins (or some other special subset of users) will be able to select it.

Transactions/subscriptions will provide a check against users editing global rules in ways that are bad.

Test Plan: Next diffs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T2769

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

Details

Provenance
epriestleyAuthored on Aug 2 2013, 1:21 PM
Reviewer
btrahan
Differential Revision
Restricted Differential Revision
Parents
rP2820fdc89b60: Add PHIDs to Herald Rules
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task
T603: Support permissions/policies in all Phabricator applications

Event Timeline