1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00
phorge-phorge/src/applications/herald
awyler 6080d74112 Created personal vs. global herald rule distingtion
Summary:
A personal rule only has actions targeting the owner.  Likewise, only they can
edit the rule. OTOH, a global may affect any target and is editable by anyone.

There are no new action types.  Instead, type of the rule modifies the available
targets and the messaging in the ui.  This is beneficial because herald rule
adapters don't need to be aware of the difference between emailing the owner of
a personal rule and emailing an arbitrary user.

This diff sets up the logic and ui for creating personal/global rules.  All
existing rules have been defaulted to global.

TODO: Filter all existing rules into personal/global
TODO: Create a UI for surfacing (relevant?) global rules.

Test Plan:
1. Created a personal rule to email myself.  Created a dumby revision satisfying
the conditions of that rule.  Verified that I recieved a herald email.
2. Removed my adminship, change the owner of a personal rule. verified that I
couldn't edit the rule.
3.Changed rule type to global. verified that I could edit the rule.
4. Verified that admins can edit both global and personal rules.

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran, zizzy

Differential Revision: https://secure.phabricator.com/D1449
2012-01-19 11:21:49 -08:00
..
adapter Enable herald rule for commits that need auditing 2012-01-17 09:13:07 -08:00
config Created personal vs. global herald rule distingtion 2012-01-19 11:21:49 -08:00
controller Created personal vs. global herald rule distingtion 2012-01-19 11:21:49 -08:00
engine Enable herald rule for commits that need auditing 2012-01-17 09:13:07 -08:00
storage Created personal vs. global herald rule distingtion 2012-01-19 11:21:49 -08:00
view/rulelist Enable admin to view and delete other users' herald rules 2011-11-15 16:21:51 -08:00