1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 11:42:42 +01:00
phorge-phorge/webroot/rsrc/js/application
epriestley 7f98a8575d Allow different policy rules for different types of objects
Summary:
Ref T5681. Policy rules can now select objects they can apply to, so a rule like "task author" only shows up where it makes sense (when defining task policies).

This will let us define rules like "members of thread" in Conpherence, "subscribers", etc., to make custom policies more flexible.

Notes:

  - Per D13251, we need to do a little work to get the right options for policies like "Maniphest > Default View Policy". This should allow "task" policies.
  - This implements a "task author" policy as a simple example.
  - The `willApplyRule()` signature now accepts `$objects` to support bulk-loading things like subscribers.

Test Plan:
  - Defined a task to be "visible to: task author", verified author could see it and other users could not.
  - `var_dump()`'d willApplyRule() inputs, verified they were correct (exactly the objects which use the rule).
  - Set `default view policy` to a task-specific policy.
  - Verified that other policies like "Can Use Bulk Editor" don't have these options.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5681

Differential Revision: https://secure.phabricator.com/D13252
2015-06-13 15:44:03 -07:00
..
aphlict Conpherence - improve performance by handling dropdowns (notifications, threads) as standard response data 2015-05-07 16:04:56 -07:00
auth Add Persona auth provider 2013-10-14 14:34:57 -07:00
calendar Show informative errors when attempting to set a recurrence end date on a non-recurring event. 2015-06-07 15:57:19 -07:00
config Fix custom field selector control in cases where the user doesn't edit anything 2015-05-25 05:34:23 -07:00
conpherence Conpherence - fix default widget on main Conpherence view. 2015-06-09 13:48:47 -07:00
countdown Define JavaScript functions before they are used 2014-12-30 02:53:32 -08:00
dashboard Fix various spelling mistakes 2014-07-13 00:45:33 +10:00
differential Allow inline comments to be individually hidden 2015-05-27 10:28:38 -07:00
diffusion Make taller tables the default for AphrontTableView 2015-04-08 08:38:15 -07:00
doorkeeper Various linter fixes. 2014-02-26 12:44:58 -08:00
files Various linter fixes. 2014-02-26 12:44:58 -08:00
herald Implement a "Space is any of..." condition in Herald 2015-06-11 10:14:06 -07:00
maniphest Support Spaces in Maniphest batch editor 2015-06-11 10:24:39 -07:00
owners Change double quotes to single quotes in JavaScript. 2014-06-24 03:35:39 +10:00
passphrase Rename Passphrase credential control JS 2015-03-02 13:01:00 -08:00
phame Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
pholio Quicksand and Pholio - make mock edit work 2015-05-07 10:42:07 -07:00
phortune Remove support for Balanced payments 2015-03-13 15:47:37 -07:00
policy Allow different policy rules for different types of objects 2015-06-13 15:44:03 -07:00
ponder Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
projects Conpherence + workboards - fix dragging behavior breaking on subsequent page loads 2015-05-12 11:37:55 -07:00
releeph Make scrolling happen relative to the main content frame 2015-01-25 08:42:40 -08:00
repository Search symbols by ctrl/cmd-click 2015-05-28 15:33:06 -07:00
search Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
slowvote Replace the primary scrollbar with a fake one to prepare for a persistent chat column 2015-01-23 13:29:15 -08:00
transactions Don't put a spacer line on the bottom of previews 2015-05-18 12:18:10 -07:00
typeahead Implement viewer() and members(project) typeahead functions 2015-04-17 11:06:58 -07:00
uiexample Use window.confirm instead of confirm 2014-12-30 02:55:12 -08:00