1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 09:48:47 +02:00
Commit graph

7884 commits

Author SHA1 Message Date
epriestley
3cdaf52ce9 Make Subscribers automatically provide working SearchFields
Summary:
Ref T8441. Ref T7715. For modern Query classes, automatically make subscriber queries and SearchField integrations work.

In particular, we can just drive this query with EdgeLogic and don't need to do anything specific on these Query classes beyond making sure they're implemented in a way that picks up all of the EdgeLogic clauses.

Test Plan:
  - Searched for subscribers in Pholio, Files, Paste, and Projects.
  - Searched for all other fields in Projects to check that Query changes are OK.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13191
2015-06-08 12:20:53 -07:00
epriestley
3e2b0c35f9 Move People to SearchFields
Summary:
Ref T8441. Ref T7715. This is the second of three ApplicationSearch + CustomField use cases (Maniphest is the third).

Also add a way to set a default ordering for the fields.

Test Plan:
  - Performed searches with each field.
  - Added a custom field and searched for it.
  - Observed desired ordering.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13190
2015-06-08 12:20:35 -07:00
epriestley
c8b866a956 Move Projects to SearchFields
Summary:
Ref T8441. Ref T7715. This is mostly about getting SearchFields + CustomFields working.

(This includes a couple of SearchFields which aren't used quite yet.)

Test Plan:
  - Used all search controls.
  - Defined custom fields and searched for them.
  - Created an old saved search which searches on custom fields on master, switched to this patch, search worked exaclty as written.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13189
2015-06-08 12:20:16 -07:00
lkassianik
ace7505f2e Check if recurrence end date is disabled before saving it.
Summary: Ref T8357, Check if recurrence end date is disabled before saving it.

Test Plan: Create new event, before saving, leave "recurrence end date" unchecked, save, should not get an error.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8357

Differential Revision: https://secure.phabricator.com/D13212
2015-06-08 11:58:45 -07:00
lkassianik
973101cae6 Correctly display event id and sequence in crumb and page title on eventviewcontroller
Summary: Fixes T8459, Correctly display event id and sequence in crumb and page title on eventviewcontroller

Test Plan: Open `E111/3`, crumb and title should display '`E111 (3)`' instead of '`E111`'.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8459

Differential Revision: https://secure.phabricator.com/D13211
2015-06-08 11:05:54 -07:00
epriestley
c3b11439f2 Apply Herald subscription effects immediately
Summary:
Fixes T8464. We could incorrectly use a cached value when computing CC's.

Just load a fresh value. There are no other callers that would benefit from this cache, so it's more complicated to reload it correctly prior to publishing than to just skip it.

Also make the PHID headers unique.

Test Plan:
  - Verified that users received mail about the transactions which caused them to be added to an object.
  - Veirfied that headers no longer have redundant values.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8464

Differential Revision: https://secure.phabricator.com/D13206
2015-06-08 10:50:13 -07:00
epriestley
49570cb1c4 Fix an issue with mention transactions in Calendar
Summary:
Fixes an issue where mentioning an event name (like `E999`) in a revision summary (and probably elsewhere) would produce an error like this:

```
2015/06/08 17:30:22 [error] 27702#0: *307450 FastCGI sent in stderr: "PHP message: [2015-06-08 17:30:22] EXCEPTION: (Exception) Transaction ("PHID-XACT-CEVT-zglgzy36aote5ja", of type "core:edge") requires a handle ("PHID-DREV-4m6vorimvg4bm3ltskca") that it did not load. at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:285]
PHP message: arcanist(head=master, ref.master=8c589f1f759f), phabricator(head=master, ref.master=b4de79741ceb), phutil(head=master, ref.master=4a0e1b47a584)
PHP message:   #0 <#2> PhabricatorApplicationTransaction::getHandle(string) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:474]
PHP message:   #1 <#2> PhabricatorApplicationTransaction::shouldHide() called at [<phabricator>/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php:82]
PHP message:   #2 <#2> PhabricatorCalendarEventTransaction::shouldHide() called at [<phutil>/src/utils/utils.php:428]
PHP message:   #3 <#2> mfilter(array, string, boolean) called at [<phabricator>/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php:350]
PHP message:   #4 <#2> PhabricatorCalendarEventEditor::shouldSendMail(PhabricatorCalendarEvent, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:990]
PHP message:   #5 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorCalendarEvent, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2937]
PHP message:   #6 <#2> PhabricatorApplicationTransactionEditor::applyInverseEdgeTransactions(DifferentialRevision, DifferentialTransaction, integer) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:602]
...
```

This is similar to rP98aae51c / rP0fc0af64, but for Calendar. (Likely, I copy/pasted the Editor from Maniphest a while ago.)

We don't need to do this filtering here because we do it later before sending mail. Additionally, because some transactions may hide or show depending on the viewer, it's strictly incorrect to do it here.

Test Plan:
  - Created a revision which mentioned a bunch of events.
  - Grepped for other implementations of `shouldSendMail()` and verified that none try to perform similar filtering.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, lpriestley

Differential Revision: https://secure.phabricator.com/D13210
2015-06-08 10:48:49 -07:00
epriestley
9e88ede69d Use standard subscribers effects in Herald Adapter for revisions
Summary:
Ref T8455. Use standard effects for revisions, instead of a custom effect.

This fixes the major issue (conduit error) in T8455 because the standard effect now performs PHID type filtering.

This retains other behaviors (in particular: not re-CC'ing explicitly removed CCs).

Test Plan:
  - With a Herald rule that adds a mailing list as a CC, created a revision before the change and hit the error in T8455. After the change, saw correct behavior.
  - Wrote a normal Herald rule to add CCs and created a revision, saw it fire properly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13183
2015-06-08 10:32:08 -07:00
epriestley
1e918eecfa Use standard subscribers effects in Herald Adapter for tasks
Summary: Ref T8455. Use the standard effect in task rules, instead of a custom effect.

Test Plan: Wrote a Maniphest CC rule, updated a task, saw rule activate properly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13182
2015-06-08 10:31:53 -07:00
epriestley
ab5f7a868e Use standard subscribers effects in Herald Adapter for commits
Summary: Ref T8455. Use the standard actions in commit rules, instead of a custom action.

Test Plan: Wrote an "add cc" Herald rule for commits, pushed a commit, saw the rule fire correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13181
2015-06-08 10:31:38 -07:00
epriestley
e2b0f814d4 Use standard subscribers effects in Herald Adapter for Phriction
Summary: Ref T8455. Instead of using an ad-hoc subscribers effect in Phriction, use the new standard one (introduced previously; this depends on D13178).

Test Plan:
  - Wrote an "add subscribers" Herald rule, updated a Phriction document, saw it apply its effect.
  - Observed availability of "remove" subscribers actions.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13180
2015-06-08 10:31:09 -07:00
epriestley
ee4c7268fe Make "ADD_CC" and "REMOVE_CC" available as "standard" Herald effects
Summary:
Ref T8455. Begins consolidating the code for applying these effects:

  - Makes Add/Remove subscribers a standard effect, and uses it in Pholio.
  - This includes the "don't re-subscribe users who have explicitly unsubscribed" logic from Differential in the standard effect. I think this rule is always desirable.
  - This adds new filtering of invalid PHID types to resolve the `arc diff` issue in T8455 once Differential uses this standard effect.
  - Added "Remove Subscribers" to MockAdapter in order to test that it works.
  - Relabeled "CC" in Pholio to "Subscribers" for consistency.

Test Plan:
  - Created several rules which add subscribers to (and remove subscribers from) mocks.
  - Updated mocks, changing properties and adding and removing subscribers.
  - Observed transactions applying and aggregating properly.
  - Observed add/remove rules each working correctly.
  - Observed the "don't re-add unsubscribed users" condition acting on subscribers who had previously been added but explicitly removed/unsubscribed.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13179
2015-06-08 10:30:22 -07:00
epriestley
ce434e821c Make ACTION_NOTHING a "standard" action in Herald
Summary: Ref T8455. Multiple adapters implement essentially identical effects for ACTION_NOTHING. Consolidate them.

Test Plan: Created several `ACTION_NOTHING` rules and updated the corresponding objects.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13178
2015-06-08 10:30:09 -07:00
epriestley
623aaf488d Consolidate "Subscribers" Herald field value logic
Summary:
Ref T8455. The Herald code in general isn't nearly as modular as it should be, and the subscriber code particularly has some legacy cruft. This is making it fragile and causing the issue described in T8455.

Currently, each Herald adapter has essentially identical code which it uses to determine which users are subscribed to an object. Instead, share code between object types.

I removed "explicitCCs":

  - The value was always identical to doing the query in the common/standard way.
  - They were only used to print a diagnostic message on transcripts, which I think is no longer relevant.
    - I believe it predates transactions, so when it was added you couldn't figure out the old object state by looking at the transaction history. Now, CC changes are recorded there, so there's no need to restate the CC state on the transcript.
    - Even if we do want to restore this (or something similar), we can do it directly from Herald now.

Test Plan:
  - Created rules that use the "CCs" field in Herald, Pholio, Maniphest and Differential.
  - Updated objects in each application.
  - Observed valid field reads in the tranascript.
  - Grepped for `FIELD_CC`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13177
2015-06-08 10:18:01 -07:00
epriestley
2e0f189950 Fix an issue with extended policy checks and @mentions
Summary: Ref T8463.

Test Plan:
  - Created a new revision via web UI with a username `@mention` in the summary and no repository.
  - Prior to patch, hit a "not attached" error.
  - After patch, no error.
  - Created a new web UI revision, as above, but with a repository; saw repository work fine.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8463

Differential Revision: https://secure.phabricator.com/D13205
2015-06-08 10:07:05 -07:00
Joshua Spence
7eac4865ab Add an index to the story notification table
Summary: Fixes T8433. Add an index to the `phabricator_feed.feed_storynotification` table. Primarily, this speeds up object destruction.

Test Plan: Ran `./bin/storage upgrade` and saw the migration apply cleanly.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8433

Differential Revision: https://secure.phabricator.com/D13164
2015-06-08 11:28:49 +10:00
Joshua Spence
b6e2f0087e Rename some remarkup classes
Summary: Ref T5655. Rename `DoorkeeperRemarkupRuleAsana` and `DoorkeeperRemarkupRuleJIRA` for consistency.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D13165
2015-06-08 11:27:20 +10:00
Joshua Spence
5914bbd806 Remove *TransactionType classes
Summary: Remove the `*TransactionType` classes and define the constants in the corresponding `*Transaction` class instead.

Test Plan: `grep`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13188
2015-06-08 11:26:43 +10:00
Joshua Spence
259b40fc28 Fix some method visibilities
Summary: See D13185, the `testMethodVisibility()` test was not being executed.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13186
2015-06-08 09:52:14 +10:00
lkassianik
47051643c7 Show informative errors when attempting to set a recurrence end date on a non-recurring event.
Summary: Fixes T8458, Show informative errors when attempting to set a recurrence end date on a non-recurring event.

Test Plan: Create new event, set recurrence end date via date-picker without setting the "is recurring" checkbox, and attempt to save. Should get error saying there cannot be a recurrence end date on a non-recurring event.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8458

Differential Revision: https://secure.phabricator.com/D13192
2015-06-07 15:57:19 -07:00
epriestley
ecc4c531c9 Stop threading handles through the CustomField + ApplicationSearch pipeline
Summary:
Ref T8441. Ref T7715.

  - These are obsolete after the Viewer/HandlePool changes.
  - These are unused after the typeahead parameterization changes.

Test Plan: `grep`, poked around.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13176
2015-06-07 07:32:46 -07:00
epriestley
cdef3e8bc8 Convert Files to SearchFields
Summary:
Ref T8441. Ref T7715.

  - Update FileSearchEngine.
  - Nothing too special/fancy.

Test Plan:
  - Searched for various files.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13175
2015-06-07 07:32:09 -07:00
epriestley
2492fef029 Move Pholio to SearchFields
Summary:
Ref T8441. Ref T7715.

  - Update PholioSearchEngine.
  - Automatically add project fields.
  - Update Paste to support project search.
  - Simplify common Query class construction.

Test Plan:
  - Searched for pastes.
  - Searched for mocks.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13174
2015-06-07 07:31:28 -07:00
lkassianik
e4c38bb993 DRAFT - Make cancel/reinstate child/ghost/recurring events work
Summary: Ref T2896, Make cancel/reinstate child/ghost/recurring events work

Test Plan: Cancel/reinstate child/ghost/recurring events.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T2896

Differential Revision: https://secure.phabricator.com/D13145
2015-06-06 13:03:21 -07:00
epriestley
b4de79741c Fix a minor issue with the approval queue
Ref T8454. This got gummed up in swapping between double negatives like "noDisabled".

Viewed queue, saw "Hide Disabled Users" instead of "Show Only Disabled Users".

Auditors: joshuaspence, btrahan
2015-06-06 06:39:02 -07:00
epriestley
1e4e121956 Put Spaces on Hovercards and ObjectItemLists
Summary: Ref T8449.

Test Plan:
{F474186}

{F474187}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T8449

Differential Revision: https://secure.phabricator.com/D13173
2015-06-05 14:20:25 -07:00
epriestley
4f0d61436b Add a Spaces remarkup rule
Summary: Ref T8449.

Test Plan: {F474032}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8449

Differential Revision: https://secure.phabricator.com/D13172
2015-06-05 14:19:40 -07:00
epriestley
b5dfd34e4a Support PhabricatorSpacesInterface in ApplicationSearch UI
Summary: Ref T8441. Does what it says, provided other conditions (like using the new SearchField stuff) are fulfilled.

Test Plan:
{F473836}

{F473837}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8441

Differential Revision: https://secure.phabricator.com/D13171
2015-06-05 11:21:45 -07:00
epriestley
65b891b095 Move some value massaging into SearchFields
Summary: Ref T8441. Ref T7715. Let SearchFields do some value massaging before buiding queries so we don't have to work as hard in each SearchEngine. Particularly, they can handle evaluateTokens() from Tokenizers.

Test Plan: Paste automatically gained access to `viewer()`, etc.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13170
2015-06-05 11:21:22 -07:00
epriestley
08966ba311 Begin modularizing fields in SearchEngines
Summary:
Ref T8441. Ref T7715. Add a layer of indirection to fields in search engines. This will allow us to:

  - Simplify SearchEngine code, which has collected a lot of duplication around expressing what is effectively field types.
  - Automatically add fields like "Spaces" and "Projects" (primary driver for T8441).
  - Reorder or hide fields (not sure if we really want to do this, but it seems plausible, and this will let us play around with it, at least).
  - Drive Conduit Query methods via SearchEngines, so the same code specifies both the search UI and the `application.query` endpoint (primary driver in T7715).

Test Plan:
  - Searched for stuff in Paste, everything behaved exaclty like it used to (except that I removed the "no language" checkbox, which seemed like fluff from a bygone era).
  - Searched for stuff in other applications, saw no changes.
  - Hit date field errors.
  - Used query strings to specify values.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13169
2015-06-05 11:21:08 -07:00
epriestley
68486c4541 Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType
Summary: Ref T8441. I want to use `PhabricatorSearchField` for a better, more useful object.

Test Plan: `grep`, `arc lint`

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8441

Differential Revision: https://secure.phabricator.com/D13168
2015-06-05 11:01:25 -07:00
epriestley
fc3d11809f Give Nuance form sources a web UI
Summary:
Ref T8434. Hard-codes form sources as a complaint form.

This form is close to perfect and I'm not actually sure we need to let users customize it at all.

Test Plan: {F473587}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8434

Differential Revision: https://secure.phabricator.com/D13166
2015-06-05 11:01:06 -07:00
epriestley
f529ade9f7 Add Nuance Queue list/edit/detail views
Summary: Ref T8434. Throw these together.

Test Plan: Created a new Queue.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8434

Differential Revision: https://secure.phabricator.com/D13163
2015-06-05 10:49:35 -07:00
epriestley
2c065f3f3d Add a list view for Nuance sources
Summary: Ref T8434. Now you can list them.

Test Plan: Listed sources.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8434

Differential Revision: https://secure.phabricator.com/D13162
2015-06-05 10:44:18 -07:00
epriestley
837e6b5ca7 Slightly modernize NuanceSource
Summary:
Ref T8434. Minor cleanup/modernization. I made type selection modal (like Herald, Auth, etc) so we can render the form on the next screen based on the type.

{F472519}

Test Plan: Created a new source, edited an existing source.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8434

Differential Revision: https://secure.phabricator.com/D13161
2015-06-05 10:44:02 -07:00
epriestley
1f65a50f04 Slightly modernize NuanceQueue
Summary: Ref T8434. Touch things up a bit. This also cleans up the missing ApplicationTransactionInterface for T6367.

Test Plan: Didn't create a new queue. Didn't edit an existing queue.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: jeremyb, epriestley

Maniphest Tasks: T8434

Differential Revision: https://secure.phabricator.com/D13160
2015-06-05 10:43:37 -07:00
epriestley
ef90007a21 Support Spaces transactions
Summary:
Ref T8424. This adds crude integration with Paste's edit/view workflows: you can change the space a Paste appears in, see transactions, and get a policy callout.

Lots of rough edges and non-obviousness but it pretty much works.

Test Plan:
  - Created and updated Pastes.
  - Moved them between spaces, saw policy effects.
  - Read transactions.
  - Looked at feed.
  - Faked query to return no spaces, saw control and other stuff vanish.
  - Faked query to return no spaces, created pastes.
  - Tried to submit bad values and got errors.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8424

Differential Revision: https://secure.phabricator.com/D13159
2015-06-05 10:42:49 -07:00
Erik Fercak
5deaeec668 Use a class constant instead of a hardcoded string
Test Plan: Submitted a form - saw nothing out of ordinary.

Reviewers: #blessed_reviewers

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13167
2015-06-05 07:27:35 -07:00
Joshua Spence
006a877996 Allow ghost atoms to be rendered
Summary: Ref T4558. Allow ghost atoms to be rendered in #diviner. This functionality didn't exist previously, but was hinted at by the TODO comments.

Test Plan: Generated #diviner documentation for rARC and then removed a class (before re-generating the documentation). Navigated to the documentation for the removed class and saw "This atom no longer exists".

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley

Maniphest Tasks: T4558

Differential Revision: https://secure.phabricator.com/D13114
2015-06-05 18:07:13 +10:00
epriestley
c1c897b961 Provide core policy support for Spaces
Summary:
Ref T8424. No UI or interesting behavior yet, but integrates Spaces checks:

  - `PolicyFilter` now checks Spaces.
  - `PolicyAwareQuery` now automatically adds Spaces constraints.

There's one interesting design decision here: **spaces are stronger than automatic capabilities**. That means that you can't see a task in a space you don't have permission to access, //even if you are the owner//.

I //think// this is desirable. Particularly, we need to do this in order to exclude objects at the query level, which potentially makes policy filtering for spaces hugely more efficient. I also like Spaces being very strong, conceptually.

It's possible that we might want to change this; this would reduce our access to optimizations but might be a little friendlier or make more sense to users later on.

For now, at least, I'm pursuing the more aggressive line. If we stick with this, we probably need to make some additional UI affordances (e.g., show when an owner can't see a task).

This also means that you get a hard 404 instead of a policy exception when you try to access something in a space you can't see. I'd slightly prefer to show you a policy exception instead, but think this is generally a reasonable tradeoff to get the high-performance filtering at the Query layer.

Test Plan:
  - Added and executed unit tests.
  - Put objects in spaces and viewed them with multiple users.
  - Made the default space visible/invisible, viewed objects.
  - Checked the services panel and saw `spacePHID` constraints.
  - Verified that this adds only one query to each page.

Reviewers: btrahan, chad

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T8424

Differential Revision: https://secure.phabricator.com/D13156
2015-06-04 17:46:32 -07:00
epriestley
e595478f1d Make policy violation dialog more flexible
Summary:
Ref T8424. When users are rejected because they can't see the space an object is in, this isn't really a capability rejection. Don't require a capability when rejecting objects.

This mostly simplifies upcoming changes.

Test Plan:
  - Viewed a capability exception dialog, it looked the same as always.
  - (After additional changes, viewed a space exception dialog.)

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8424

Differential Revision: https://secure.phabricator.com/D13155
2015-06-04 17:45:51 -07:00
epriestley
763b63a0fb Add spacePHID infrastructure and implement in Paste
Summary:
Ref T8424. I'm using Paste as a testbed application because Spaces make some degree of sense for it but it's also flat/simple.

This doesn't do anything interesting or useful and mostly just making the next (more interesting) diff smaller.

Test Plan:
  - Ran `bin/storage upgrade -f`.
  - Browsed pastes.
  - Created a paste.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8424

Differential Revision: https://secure.phabricator.com/D13154
2015-06-04 17:45:24 -07:00
epriestley
52a29be70d Introduce a request cache mechanism
Summary:
Ref T8424. This adds a standard KeyValueCache to serve as a request cache.

In particular, I need to cache Spaces (they are frequently accessed, sometimes by multiple viewers) but not have them survive longer than the scope of one request.

This request cache is explicitly destroyed by each web request and each daemon request.

In the very long term, building this kind of construct supports reusing PHP interpreters to run web requests (see some discussion in T2312).

Test Plan:
  - Added and executed unit tests.
  - Ran every daemon.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8424

Differential Revision: https://secure.phabricator.com/D13153
2015-06-04 17:27:31 -07:00
epriestley
e5b923743a Make CSRF salt per-user instead of per-request
Summary:
Fixes T8326. This removes calls to PhabricatorStartup from places that daemons may access.

This salt doesn't need to be global; it's embedded in the token we return. It's fine if we use a different salt every time. In practice, we always use the same viewer, so this change causes little or no behavioral change.

Ref T8424. For Spaces, I need a per-request cache for all spaces, because they have unusual access patterns and require repeated access, in some cases by multiple viewers.

We don't currently have a per-request in-process cache that we, e.g., clear in the daemons.

We do have a weak/theoretical/forward-looking attempt at this in `PhabricatorStartup::getGlobal()` but I'm going to throw that away (it's kind of junky, partly because of T8326) and replace it with a more formal mechanism.

Test Plan:
  - Submitted some forms.
  - Grepped for `csrf.salt`.
  - Viewed page source, saw nice CSRF tokens with salt.
  - All the salts are still the same on every page I checked, but it doesn't matter if this isn't true everywhere.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8326, T8424

Differential Revision: https://secure.phabricator.com/D13151
2015-06-04 17:26:23 -07:00
Joshua Spence
b9d004e9c4 Integrate Diviner with global search
Summary: Fixes T7458. Integrates #diviner into #applicationsearch by indexing `DivinerLiveBook` and `DivinerLiveSymbol` search documents. Depends on D13157.

Test Plan: Ran `./bin/search index --all --type BOOK` and `./bin/search index --all --type ATOM` and then searched for various symbols via global search.

Reviewers: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7458

Differential Revision: https://secure.phabricator.com/D13090
2015-06-05 07:27:48 +10:00
Joshua Spence
0d50c40973 Fix a few Diviner method calls
Summary: I missed these in D13157.

Test Plan: Browsed around #diviner.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13158
2015-06-05 07:27:13 +10:00
Joshua Spence
32f669d566 Invert include/exclude logic on DivinerAtomQuery
Summary: Fixes T8401. Change `withIncludeGhosts()` to `withExcludeGhosts()` and `withIncludeUndocumentable()` to `withExcludeDocumentable()`. In particular, this allows querying for atoms by PHID to work as expected.

Test Plan: I got confused with double negatives so I might have gotten some of these wrong... I poked around Diviner and re-generated documentation to verify that this is working as expected.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8401

Differential Revision: https://secure.phabricator.com/D13157
2015-06-05 07:23:19 +10:00
epriestley
0fc0af6443 Let Maniphest send mail again.
Ha ha ha! Fixes T8422.

Auditors: btrahan
2015-06-04 09:49:10 -07:00
epriestley
98aae51c3d Fix an issue with mentions in transactions
Ref T6367. Fixes T8415.

Maniphest filters transactions too early. This happens automatically later. Remove the code.

Transactions should be filtered per-user. If a transaction is hidden for some users, we shouldn't mail them. Move the filtering logic to be per-user.

Stack:

```
[Thu Jun 04 05:51:05.371061 2015] [:error] [pid 25111] [client 127.0.0.1:56497] [2015-06-04 05:51:05] EXCEPTION: (Exception) Transaction ("PHID-XACT-TASK-x4jlylat47s6ttr", of type "core:edge") requires a handle ("PHID-DREV-rs7jaoxbcb3av6biq4b5") that it did not load. at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:277]
[Thu Jun 04 05:51:05.372546 2015] [:error] [pid 25111] [client 127.0.0.1:56497] arcanist(head=master, ref.master=4e83efb31d3e), instances(head=master, ref.master=db56d5d6ad91), ledger(head=master, ref.master=5694485699a4), libcore(), phabricator(head=xaction1, ref.master=04a22a8fa443, ref.xaction1=04a22a8fa443, custom=17), phutil(head=master, ref.master=c2cd90ee7aec), services(head=master, ref.master=2d76591c4f87)
[Thu Jun 04 05:51:05.372559 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #0 <#2> PhabricatorApplicationTransaction::getHandle(string) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:463]
[Thu Jun 04 05:51:05.372564 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #1 <#2> PhabricatorApplicationTransaction::shouldHide() called at [<phabricator>/src/applications/maniphest/storage/ManiphestTransaction.php:163]
[Thu Jun 04 05:51:05.372568 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #2 <#2> ManiphestTransaction::shouldHide() called at [<phutil>/src/utils/utils.php:428]
[Thu Jun 04 05:51:05.372572 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #3 <#2> mfilter(array, string, boolean) called at [<phabricator>/src/applications/maniphest/editor/ManiphestTransactionEditor.php:380]
[Thu Jun 04 05:51:05.372576 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #4 <#2> ManiphestTransactionEditor::shouldSendMail(ManiphestTask, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:957]
[Thu Jun 04 05:51:05.372580 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #5 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(ManiphestTask, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2858]
[Thu Jun 04 05:51:05.372585 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #6 <#2> PhabricatorApplicationTransactionEditor::applyInverseEdgeTransactions(DifferentialRevision, DifferentialTransaction, integer) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:569]
[Thu Jun 04 05:51:05.372589 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #7 <#2> PhabricatorApplicationTransactionEditor::applyBuiltinExternalTransaction(DifferentialRevision, DifferentialTransaction) called at [<phabricator>/src/applications/differential/editor/DifferentialTransactionEditor.php:615]
[Thu Jun 04 05:51:05.372594 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #8 <#2> DifferentialTransactionEditor::applyBuiltinExternalTransaction(DifferentialRevision, DifferentialTransaction) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:489]
[Thu Jun 04 05:51:05.372611 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #9 <#2> PhabricatorApplicationTransactionEditor::applyExternalEffects(DifferentialRevision, DifferentialTransaction) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:827]
[Thu Jun 04 05:51:05.372616 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #10 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(DifferentialRevision, array) called at [<phabricator>/src/applications/differential/controller/DifferentialCommentSaveController.php:124]
[Thu Jun 04 05:51:05.372621 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #11 <#2> DifferentialCommentSaveController::processRequest() called at [<phabricator>/src/aphront/AphrontController.php:33]
[Thu Jun 04 05:51:05.372625 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #12 <#2> AphrontController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:226]
[Thu Jun 04 05:51:05.372629 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #13 phlog(Exception) called at [<phabricator>/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php:226]
[Thu Jun 04 05:51:05.372633 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #14 AphrontDefaultApplicationConfiguration::handleException(Exception) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:230]
[Thu Jun 04 05:51:05.372637 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #15 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:140]
[Thu Jun 04 05:51:05.372641 2015] [:error] [pid 25111] [client 127.0.0.1:56497]   #16 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:19]
```

Auditors: btrahan
2015-06-04 06:05:24 -07:00
Chad Little
274cbf3cdb [Redesign] Uh... Add back gradient headers?
Summary: Ref T8099, hashtag#yolo. Adds back the original gradients plus a 'light' theme. Unclear which should be default, but we can play with it until a decision needs to be made.

Test Plan: Change colors a lot, turn on durable column.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13146
2015-06-03 20:21:12 -07:00
epriestley
04a22a8fa4 Fix slop with previous patch, perhaps
Auditors: btrahan
2015-06-03 20:11:33 -07:00
epriestley
ef43a98440 Reload commits before publishing mail about them
This fixes this, which only crops up some of the time:

```
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000] [2015-06-04 03:03:10] EXCEPTION: (PhutilProxyException) Error while executing Task ID 902271. {>} (PhabricatorDataNotAttachedException) Attempting to access attached data on PhabricatorRepositoryCommit (via getCommitData()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000] Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:166]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000] arcanist(head=master, ref.master=8c589f1f759f), phabricator(head=master, ref.master=4a45620b0458), phutil(head=master, ref.master=afc05a9a7f00)
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #0 <#2> PhabricatorLiskDAO::assertAttached(string) called at [<phabricator>/src/applications/repository/storage/PhabricatorRepositoryCommit.php:129]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #1 <#2> PhabricatorRepositoryCommit::getCommitData() called at [<phabricator>/src/applications/audit/editor/PhabricatorAuditEditor.php:669]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #2 <#2> PhabricatorAuditEditor::buildMailBody(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2178]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #3 <#2> PhabricatorApplicationTransactionEditor::sendMailToTarget(PhabricatorRepositoryCommit, array, PhabricatorMailTarget) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2152]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #4 <#2> PhabricatorApplicationTransactionEditor::sendMail(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:998]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #5 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #6 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:91]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #7 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:162]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #8 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:20]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #9 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:185]
Daemon 39827 STDE [Thu, 04 Jun 2015 03:03:11 +0000]   #10 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:125]
```

Auditors: btrahan
2015-06-03 20:08:04 -07:00
epriestley
4a45620b04 Reload revisions before publishing mail about them
Fixes this, which only triggers on some kinds of mail:

```
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000] [2015-06-04 02:56:38] EXCEPTION: (PhutilProxyException) Error while executing Task ID 902251. {>} (PhabricatorDataNotAttachedException) Attempting to access attached data on DifferentialRevision (via getActiveDiff()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000] Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:166]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000] arcanist(head=master, ref.master=8c589f1f759f), phabricator(head=master, ref.master=6dede2e2c513), phutil(head=master, ref.master=afc05a9a7f00)
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #0 <#2> PhabricatorLiskDAO::assertAttached(string) called at [<phabricator>/src/applications/differential/storage/DifferentialRevision.php:158]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #1 <#2> DifferentialRevision::getActiveDiff() called at [<phabricator>/src/applications/differential/customfield/DifferentialBranchField.php:72]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #2 <#2> DifferentialBranchField::updateTransactionMailBody(PhabricatorMetaMTAMailBody, DifferentialTransactionEditor, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2481]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #3 <#2> PhabricatorApplicationTransactionEditor::addCustomFieldsToMailBody(PhabricatorMetaMTAMailBody, DifferentialRevision, array) called at [<phabricator>/src/applications/differential/editor/DifferentialTransactionEditor.php:1208]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #4 <#2> DifferentialTransactionEditor::buildMailBody(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2178]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #5 <#2> PhabricatorApplicationTransactionEditor::sendMailToTarget(DifferentialRevision, array, PhabricatorMailTarget) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2152]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #6 <#2> PhabricatorApplicationTransactionEditor::sendMail(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:998]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #7 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #8 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:91]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #9 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:162]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #10 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:20]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #11 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:185]
Daemon 39819 STDE [Thu, 04 Jun 2015 02:56:38 +0000]   #12 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:125]
```

Auditors: btrahan
2015-06-03 20:01:23 -07:00
epriestley
6dede2e2c5 Make PhameBlog implement PhabricatorApplicationTransactionInterface
Summary: Ref T6367.

Test Plan: Static correctness.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6367

Differential Revision: https://secure.phabricator.com/D13143
2015-06-03 18:59:42 -07:00
epriestley
069e60d2ff Send mail to targets in the user's translation
Summary: Ref T6367.

Test Plan:
  - Added and executed unit tests.
  - Sent mail to A (en_US) and B (en_A*).
  - Got one mail in English and one mail in ENGLISH.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6367

Differential Revision: https://secure.phabricator.com/D13142
2015-06-03 18:59:33 -07:00
epriestley
6db97bde12 Build separate mail for each recipient, honoring recipient access levels
Summary:
Ref T6367. Removes `multiplexMail()`!

We can't pass a single body into a function which splits it anymore: we need to split recipients first, then build bodies for each recipient list. This lets us build separate bodies for each recipient's individual translation/access levels.

The new logic does this:

  - First, split recipients into groups called "targets".
    - Each target corresponds to one actual mail we're going to build.
    - Each target has a viewer (whose translation / access levels will be used to generate the mail).
    - Each target has a to/cc list (the users who we'll ultimately send the mail to).
  - For each target, build a custom mail body based on the viewer's access levels and settings (language prefs not actually implemented).
  - Then, deliver the mail.

Test Plan:
  - Read new config help.

Then did a bunch of testing, primarily with `bin/mail list-outbound` and `bin/mail show-outbound` (to review generated mail), `bin/phd debug taskmaster` (to run daemons freely) and `bin/worker execute --id <id>` (to repeatedly test a specific piece of code after identifying an issue).

With `one-mail-per-recipient` on (default):

  - Sent mail to multiple users.
  - Verified mail showed up in `mail list-outbound`.
  - Examined mail with `mail show-outbound`.
  - Added a project that a subscriber could not see.
    - Verified it was not present in `X-Phabricator-Projects`.
    - Verified it was rendered as "Restricted Project" for the non-permissioned viewer.
  - Added a subscriber, then changed the object policy so they could not see it and sent mail.
    - Verified I received mail but the other user did not.
  - Enabled public replies and verified mail generated with public addresses.
  - Disabld public replies and verified mail generated with private addresses.

With `one-mail-per-recipient` off:

  - Verified that one mail is sent to all recipients.
  - Verified users who can not see the object are still filtered.
  - Verified that partially-visible projects are completely visible in the mail (this violates policies, as documented, as the best available compromise).
  - Enabled public replies and verified the mail generated with "Reply To".

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: carlsverre, epriestley

Maniphest Tasks: T6367

Differential Revision: https://secure.phabricator.com/D13131
2015-06-03 18:59:31 -07:00
epriestley
a9ceebbdb1 Move all ApplicationTransaction publishing to daemons
Summary:
Ref T6367. Do all mail, feed, notification and search stuff from the daemons, in all editors.

There are four relatively-stateful editors (Audit, Differential, Phriction, PhortuneCart) which needed special care to move state into the daemons properly.

Beyond that, I moved mailTo/mailCC/feedRelated/feedNotify to be computed before we enter the worker:

  - This is simpler, since a lot of editors rely on being able to call `$object->getReviewers()` or similar to compute them.
  - This is more correct, since we want to freeze the lists at this moment in time.

Finally, I renamed `loadEdges` to `willPublish` and made it a slightly more general hook.

---

This is a bit fragile and I'm not //thrilled// about it.

It would probably be cleaner to have separate Editor and Publisher classes (something like @fabe's D11329 did). However, I think that's quite a lot of work, and I'd like to see stronger motivation for it (either in this actually being more fragile than I think, or there being other things we get out of it). Overall, I'm comfortable with this change, just definitely not a big fan of the "save" + "load" pattern since I think it's really fragile, nonobvious, hard to debug/predict, etc.

Test Plan:
Directly updated editors:

- Created a new Phriction page, saw "Document Content".
- Edited a Phriction page, saw "Document Diff".
- Edited a revision, got normal looking mail.
- Faked in `changedPriorToCommitURI` and verified it survived the state boundary.
- Sent Audit mail.
- Sent invoice mail.

Indirect editors - for these, I just made a change and made sure the mail generated:

- Updated a paste.
- Updated an event.
- Updated a thread.
- Updated a task.
- Updated a mock.
- Updated a question.
- Updated a project.
- Updated a file.
- Updated an initiative.
- Updated a Legalpad document.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, fabe

Maniphest Tasks: T6367

Differential Revision: https://secure.phabricator.com/D13115
2015-06-03 18:59:29 -07:00
epriestley
1fc1114e29 Allow TransactionEditor to move publishing work to the daemons
Summary:
Ref T6367. This is similar to D11329, but not quite as ambitious.

Allow Editors to implement `supportsWorkers()` and move their publishing work into a daemon. So far, only Paste supports this.

Most of the complexity here is saving and restoring state across the barrier between the web process and the worker process, but I think this is ~90% of it and then we'll pick up a couple of random things in applications.

I'm primarily trying to keep this as gradual as possible.

Test Plan:
  - Published transactions with and without daemon support.
  - Looked at mail, feed.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: fabe, epriestley

Maniphest Tasks: T6367

Differential Revision: https://secure.phabricator.com/D13107
2015-06-03 18:59:28 -07:00
epriestley
d6247ffca5 Add support for "Extended Policies"
Summary:
Ref T7703. See that task and inline for a bunch of discussion.

Briefly, when we run implicit policy rules ("to see a revision, you must also be able to see its repository") at query time, they don't apply to other viewers we might check later.

We do this very rarely, but when we do we're often doing it for a bunch of different viewers (for example, in Herald) so I don't want to just reload the object a million times.

Test Plan:
  - Added and executed unit tests.
  - Wrote a "flag everything" Herald rule, as in the original report in T7703, and no longer got "Unknown Object" flags on revisions.
  - Rigged up a lot of cases in the web UI and couldn't find any inconsistencies, although this case is normally very hard to hit.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7703

Differential Revision: https://secure.phabricator.com/D13104
2015-06-03 18:59:27 -07:00
epriestley
908b426ee2 Put PhabricatorMetaMTAMailingList back to keep bin/storage adjust happy for now
Auditors: btrahan
2015-06-03 18:51:40 -07:00
epriestley
a4d874287f Allow administrators to configure "Email Settings" settings for lists
Summary:
Fixes T8387. This completes conversion of lists into users.

These settings allow administrators to reduce the amount of mail delivered to lists, ahead of T5791.

Test Plan: {F468206}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8387

Differential Revision: https://secure.phabricator.com/D13138
2015-06-03 18:42:41 -07:00
epriestley
d4a2034d2f Allow administrators to configure "Email Format" settings for lists
Summary: Ref T8387. Mostly completeness, but you might want to choose html vs text mail.

Test Plan: {F468203}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8387

Differential Revision: https://secure.phabricator.com/D13137
2015-06-03 18:42:40 -07:00
epriestley
14e318cb16 Allow administrators to edit the "Account" panel for mailing lists and bots
Summary:
Ref T8387. Ref T6367. This allows selection of a language, which will be respected in email delievered to the list users.

For example, you could have a German list that gets mail in German or something. I don't know that the feature is really useful, it's mostly just for completeness.

I also supported it for bots, mostly so their pronouns can be configured.

Test Plan: {F468186}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6367, T8387

Differential Revision: https://secure.phabricator.com/D13136
2015-06-03 18:42:39 -07:00
epriestley
02f0c099fa Fix some minor Spaces method visibility issues
Summary: Ref T8377. These were picked up by tests.

Test Plan: `arc unit --everything`

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8377

Differential Revision: https://secure.phabricator.com/D13130
2015-06-03 18:42:38 -07:00
epriestley
ba6cb62b49 Remove mailing lists application
Summary: Ref T8387. This is now completely obsoleted by mailing list users.

Test Plan: Grepped for `mailinglist` and related symbols.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, epriestley

Maniphest Tasks: T8387

Differential Revision: https://secure.phabricator.com/D13129
2015-06-03 18:42:36 -07:00
epriestley
e0a3e6ba3b Allow administrators to manage addresses for mailing list users
Summary: Ref T8387. Mostly just modernizes this panel to work for viewers vs users. Auto-verify these edits since they aren't otherwise verifiable.

Test Plan:
  - Added, changed, removed addresses for a list.
  - Used panel normally for my own account.
  - Verified bots don't get a panel.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, epriestley

Maniphest Tasks: T8387

Differential Revision: https://secure.phabricator.com/D13125
2015-06-03 18:42:34 -07:00
epriestley
992c199577 Add "Mailing List" users
Summary:
Ref T8387. Adds new mailing list users.

This doesn't migrate anything yet. I also need to update the "Email Addresses" panel to let administrators change the list address.

Test Plan:
  - Created and edited a mailing list user.
  - Viewed profile.
  - Viewed People list.
  - Searched for lists / nonlists.
  - Grepped for all uses of `getIsDisabled()` / `getIsSystemAgent()` and added relevant corresponding behaviors.
  - Hit the web/api/ssh session blocks.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, tycho.tatitscheff, epriestley

Maniphest Tasks: T8387

Differential Revision: https://secure.phabricator.com/D13123
2015-06-03 18:42:33 -07:00
epriestley
13f0dac0ed Expand the power of user filtering
Summary:
Ref T8387. This mostly merges D10565 + D10480. I'm going to touch this to add mailing list stuff shortly so I wanted to clean those up.

This isn't super pretty but is fully flexible and consistent with other modern query UIs.

This should be more-or-less backward compatible.

Test Plan: Fiddled with the new options.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, cburroughs, epriestley

Maniphest Tasks: T8044, T8387

Differential Revision: https://secure.phabricator.com/D13122
2015-06-03 18:42:32 -07:00
epriestley
8440b3efc0 Update account roles documentation and remove actAsUser
Summary:
Ref T8387. This describes changes I haven't made yet, but plan to make.

Also removes the long-deprecated actAsUser capability so I can remove the caveat about it from the documentation.

Test Plan: `grep`, reading

Reviewers: btrahan, eadler

Reviewed By: btrahan, eadler

Subscribers: eadler, epriestley

Maniphest Tasks: T8387

Differential Revision: https://secure.phabricator.com/D13120
2015-06-03 18:42:09 -07:00
epriestley
8928aa2b67 Fix an issue with AlamancDeviceEditor
Summary: This got removed by accident in D12933.

Test Plan: Editing names works now.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13144
2015-06-03 18:41:21 -07:00
Joshua Spence
0b87e462cd Remove flags and tokens upon object destruction
Summary: When destroying an object, also remove all associated flags and tokens.

Test Plan: Awarded a Maniphest task with a token and flagged it as well. Destroyed it with `./bin/remove destroy` and saw flag and token removed from the database.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13112
2015-06-04 07:23:48 +10:00
lkassianik
55c73b20ca Attempt to optimize ghost generating code.
Summary: Ref T8394, Attempt to optimize ghost generating code.

Test Plan: Open Upcoming, cancelled only, list view query. Should not hang.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8394

Differential Revision: https://secure.phabricator.com/D13141
2015-06-03 13:01:26 -07:00
Mukunda Modell
dfac9d7f52 Add 'colors' and 'icons' fields to conduit api for Projects
Summary:
This simply adds colors, icons to ProjectQueryConduitAPIMethod and
ProjectCreateConduitAPIMethod.

Additionally, adds 'tags' to ProjectCreateConduitAPIMethod

Change-Id: Ic6332fe174a59ecfd60cea281ccb0ed938136141

Test Plan:
create a new project with project.create, specify icon, color and tags

call project.query with colors and icons args, check for results
containing matching projects.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: legoktm, aklapper, Korvin, epriestley, valhallasw, qgil

Differential Revision: https://secure.phabricator.com/D13098
2015-06-03 11:43:58 -07:00
Chad Little
8fca881093 [Redesign] Move headers to Oswald font
Summary: Ref T8099, I want to live with this for a few weeks. I've grow to like that it gives more distinction to ObjectBox Headers and fits very nicely as headers in DocumentView. Even if we don't use them for all headers, Documents are much nicer to me at least with a more visually impactful font (Source Sans doesn't make a great header).

Test Plan:
Review dashboards, objects, Diviner, Phriction, Legalpad, and misc other pages.

{F466410}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13127
2015-06-03 10:23:28 -07:00
lkassianik
d3a84687ba Query for recurring event parents should accept a "not a child of anything" clause
Summary: Closes T8371, Query for recurring event parents should accept a "not a child of anything" clause

Test Plan: querying for a list of events with recurring events should still work the same.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8371

Differential Revision: https://secure.phabricator.com/D13140
2015-06-03 09:27:39 -07:00
Joshua Spence
c26ea062d1 Remove unused PhrictionActionConstants class
Summary: This class is no longer used since D10792.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13116
2015-06-03 20:23:08 +10:00
lkassianik
446611e2e3 Cancelled recurring events should propogate to real child events
Summary: Ref T8371, Cancelled recurring events should propogate to real child events

Test Plan: Create recurring event, create and exception to a ghost event, cancel recurring event, real ghost event should be treated as cancelled while the recurring event remains cancelled.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8371

Differential Revision: https://secure.phabricator.com/D13121
2015-06-02 19:44:31 -07:00
lkassianik
5e168b629d List view should only allow 100 ghost events per recurring event.
Summary: Ref T8394, List view should only allow 100 ghost events per recurring event

Test Plan: Open list view with many recurring events. Shouldn't hang.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8394

Differential Revision: https://secure.phabricator.com/D13132
2015-06-02 18:26:51 -07:00
Chad Little
e4788df9a5 [Redesign] PHUIPagerView
Summary: Ref T8099, Moves AphrontPagerView to PHUIPagerView, converts to standard PHUIButtons and adds some additional features for icon placement on buttons.

Test Plan: Tested Advanced Search and Searching files in Diffusion. Works as expected.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8342, T8099

Differential Revision: https://secure.phabricator.com/D13092
2015-06-02 14:34:04 -07:00
Joshua Spence
1db6b9bafd Remove unused PhabricatorObjectHandleConstants class
Summary: This class is no longer used.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13117
2015-06-03 06:58:32 +10:00
Joshua Spence
c36b82c7b8 Remove unused PhabricatorMail class
Summary: This class is no longer used after D13032.

Test Plan: `grep`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13118
2015-06-03 06:58:24 +10:00
Joshua Spence
dbd7e3c56d Remove unused CalendarColors class
Summary: This class is no longer used after D12850.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13119
2015-06-03 06:58:06 +10:00
lkassianik
b576cef710 Edit link of an exception to a ghost event should not create new event
Summary: Fixes T8382, Edit link of an exception to a ghost event should not create new event

Test Plan: Create recurring event, open ghost, edit, save, edit again. Should edit event created after first edit, not new event.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8382

Differential Revision: https://secure.phabricator.com/D13108
2015-06-02 07:29:48 -07:00
Joshua Spence
bf81fda036 Linter fixes
Summary: Apply various minor linter fixes.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13109
2015-06-02 22:14:01 +10:00
Joshua Spence
2d15c3c062 Tidy up ManiphestTask destruction
Summary: Now that `ManiphestTask` implements `PhabricatorApplicationTransactionInterface`, the transaction removal happens automatically.

Test Plan: Used `./bin/remove destroy` to delete a `ManiphestTask` and saw related transactions removed as well.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13110
2015-06-02 22:12:45 +10:00
lkassianik
95551a1a5a DRAFT, recurring events need optional end dates
Summary: Ref T8357, DRAFT, recurring events need optional end dates

Test Plan: Edit recurring event, set end date, save, recurring ghosts should not generate after end date

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8357

Differential Revision: https://secure.phabricator.com/D13088
2015-06-01 18:56:11 -07:00
Bob Trahan
c83ddc3a0e Spaces - re-jigger application name for new Spaces application
Summary: got some errors in my sandbox when I updated. this fixes them and I think is the right naming convention.

Test Plan: /settings/panel/emailpreferences/ started working again!  /spaces/ also loaded  unit tests passed without errors

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8377

Differential Revision: https://secure.phabricator.com/D13103
2015-06-01 14:54:18 -07:00
epriestley
76523eec67 Implement DestructibleInterface on Spaces, add some basic tests
Summary: Ref T8377. Mostly just a framework for test coverage.

Test Plan: Tests pass.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8377

Differential Revision: https://secure.phabricator.com/D13102
2015-06-01 12:02:20 -07:00
epriestley
541b4c86b4 Add "Spaces", an application for managing policy namespaces
Summary: Ref T3820. This doesn't actually do anything yet, but dumps in all the plumbing.

Test Plan:
{F156989}

{F156990}

{F156991}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, wienczny, jdloft, devurandom, thz, hwinkel, 20after4, sascha-egerer, seporaitis, joshuaspence, chad, epriestley

Maniphest Tasks: T3820

Differential Revision: https://secure.phabricator.com/D9204
2015-06-01 11:28:38 -07:00
Chad Little
132bff3ea5 [Redesign] People, Profile, Feed UI
Summary: Ref T8099, Mostly a Feed cleanup, removing old CSS, relying on modern display objects, adds back the feed to profile (I miss it, but maybe you don't).

Test Plan: Visit Feed on Profiles, Projects, Feed, and Dashboards. Same UI Everywhere. TODO, "Public Feed".

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13101
2015-06-01 11:28:01 -07:00
epriestley
7a9174fa21 Digest resource cachekeys to maximum length
Summary:
Fixes T8372. We currently store the entire resource path in the cachekey; shorten it to a maximum of 64 characters.

The key size is 128 and T8372 had an example of a 112-byte key which could run over 128 with a slightly-long cache namespace.

Test Plan:
  - Not 100% sure this is the issue, but it seems likely.
  - Dumped the cachekey before and after the change.
  - Saw values like `celerity:/res/1432859262T/phabricator/e2460e8f/core.pkg.css-6eGjUCJORU3j` now.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8372

Differential Revision: https://secure.phabricator.com/D13095
2015-06-01 09:04:22 -07:00
Joshua Spence
c4bcfc85f1 Remove the repositories application
Summary: Fixes T7603. This application is no longer used.

Test Plan: Went to `/repository/` and got a 404.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley

Maniphest Tasks: T7603

Differential Revision: https://secure.phabricator.com/D12734
2015-06-01 15:37:13 +10:00
lkassianik
bb92819c09 Both ghost instances and exceptions to generated ghosts should be editable
Summary: Fixes T8369, Both ghost instances and exceptions to generated ghosts should be editable

Test Plan: Create recurring event, open /E{id}/1, edit, save. New exception should not be "recurring", and should be editable, as the regular ghost events.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8369

Differential Revision: https://secure.phabricator.com/D13089
2015-05-31 20:45:51 -07:00
Chad Little
e230e03880 [Redesign] Fix 'nodata' display on search results
Summary: Ref T8099, We can just set the no data string on the ObjectList directly.

Test Plan: Run a bum query, see better UI.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13087
2015-05-31 20:05:49 -07:00
Joshua Spence
9c5d9e3f47 Remove "arcanist project" fields
Summary: Ref T7604. Remove these "arcanist project" fields from the `LiskDAO` classes, but leave the data intact (there are no more read/writes to this data).

Test Plan:
- Grepped for calls to these methods.
- Ran `./bin/storage adjust` to check for schema issues.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D13012
2015-06-01 09:54:48 +10:00
Joshua Spence
ebde9357c7 Fix reverting commit language
Summary: I think the language here is inverted? On a commit which is reverted, the text states `$author added a reverted commit: $commit`. In reality, `$commit` is the //reverting// commit, not the //reverted// commit.

Test Plan: Think about English.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13067
2015-06-01 09:54:30 +10:00
lkassianik
65d9c0ea24 Edit recurring ghost events, not recurring event.
Summary: Closes T8358, Edit recurring ghost events, not recurring event.

Test Plan: Create recurring event, original event should not be editable, but ghost events should be editable.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8358

Differential Revision: https://secure.phabricator.com/D13075
2015-05-31 15:04:48 -07:00
Chad Little
f5a7e8bdbd [Redesign] Phriction UI Updates, Header tweaks
Summary: Ref T8099, walked through Phriction, updated PHUIHeader for more consistent layouts.

Test Plan: Test Phriction Document, Heirarchy, History, Diffs.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13084
2015-05-31 12:15:15 -07:00
Chad Little
79c6f1c60a [Redesign] Update Paste UI
Summary: Ref T8099, Adds a bit more color/contract to Paste.

Test Plan: Review a list of Pastes, embedded Pastes, and the main Paste UI.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13083
2015-05-31 12:13:28 -07:00
Chad Little
3dcb672076 [Redesign] Better Headers, more options
Summary: Ref T8099, Adds ability to set header as "tall" and provide better control over height of actual header text. Also fixed some color issues with multiple object boxes.

Test Plan: Review a commit, review dashboards, review a diff, review home.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13077
2015-05-31 08:36:44 -07:00
Chad Little
cc20a6c4d3 [Redesign] Lots of minor color changes
Summary: Ref T8099. Makes subheaders in object lists darker with a background. Moves to lighter icons in the header with a dark instead of blue hover state. Gives a nicer blue selected state for sidenavs.

Test Plan: Just eyeballing a lot of this, but with some level of consistency.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13065
2015-05-31 07:56:54 -07:00
Chad Little
9baa965b86 [Redesign] Workboard headers / icons
Summary: Ref T8099, cleans up spacing, colors. Switched back to dropdown icon.

Test Plan: test headers in workpanels, conpherence

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13080
2015-05-31 07:54:48 -07:00
Chad Little
2ec7cdcfba [Redesign] Use normal sized buttons for Changesets
Summary: Ref T8099, No specific reason for these to be small buttons.

Test Plan: Test desktop and mobile layouts.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13081
2015-05-31 07:53:57 -07:00
Chad Little
df9bd86890 [Redesign] Fix Conpherence crumb border
Summary: Ref T8099, Adds a border to ConpherenceView, but not other Views. Removed some old styles.

Test Plan: Visit Conpherence Room, Thread, and Search.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13062
2015-05-31 07:52:20 -07:00
J Rhodes
e7e585820b Prevent an error when the Drydock lease artifact does not exist
Summary: If a host artifact exists in a Harbormaster build, where the Drydock lease no longer exists, then an error will be raised because of the attempt to access an undefined index.  This changes the code to use `idx()` so that it correctly returns null instead.

Test Plan: Tested in production.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: joshuaspence, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13074
2015-06-01 00:39:57 +10:00
Aviv Eyal
8ea13f3ce9 Framework for external symbol search
Summary:
Ref T7984. With this, an install can add an ExternalSymbolsSource to src/extensions, which will include whatever
source they have.

Test Plan: search for php and python builtins.

Reviewers: joshuaspence, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7984

Differential Revision: https://secure.phabricator.com/D13036
2015-05-31 07:37:06 -07:00
lkassianik
447c372cfe Generated ghost events should start generating as early as the range start minus the duration of the event.
Summary: Fixes T8347, Generated ghost events should start generating as early as the range start minus the duration of the event.

Test Plan: Create a year long weekly event, a year later, each day should have about 52 events.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8347

Differential Revision: https://secure.phabricator.com/D13069
2015-05-29 15:46:18 -07:00
lkassianik
3d40a5871d Ghost events should provide a link to original event
Summary: Closes T8356, Ghost events should provide a link to original event

Test Plan: Open an instance at /calendar/event/{id}/{index}. It should have a link to /calendar/event/{id}. Original recurring event should not link to itself.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8356

Differential Revision: https://secure.phabricator.com/D13068
2015-05-29 13:58:53 -07:00
epriestley
cb52dd27fc Fix a possible query error in filtering events
If all events are filtered by range logic, this invitee query may be invalid.

Auditors: lpriestley
2015-05-29 07:17:09 -07:00
lkassianik
59f0e8f950 DRAFT Add db columns for recurring events
Summary: Ref T2896, DRAFT Add db columns for recurring events

Test Plan: Open event, confirm it still works.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: btrahan, Korvin, epriestley

Maniphest Tasks: T2896

Differential Revision: https://secure.phabricator.com/D13039
2015-05-28 17:27:25 -07:00
Bob Trahan
c7de17663a Conpherence - massage email notification to have proper link to how to update email settings
Summary: Fixes T8329. I was able to figure out a reasonable way to have the full conpherence default to the email settings panel. I think this is cleaner than making things a dialogue as I rambled about in the description for T8329.

Test Plan: using /bin/mail to verify correct email links were generated for conpherence notifications and maniphest (general) notifications.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8329

Differential Revision: https://secure.phabricator.com/D13058
2015-05-28 15:30:33 -07:00
Bob Trahan
c61b5440e1 Conpherence - add tooltip for full time for messages
Summary:
Fixes T8154. Now you can tell when a Conpherence was started by mousing over the date. I think this is sufficient.

This ends up cleaning up the code significantly; it used to inherit from some transaction view class and had built up lots of cludge over time. Much cleaner now.

Test Plan: moused over tooltips in both durable column and full conpherence and saw correct full dates. clicked on a timestamp in durable column and went to right place in full conpherence.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8154

Differential Revision: https://secure.phabricator.com/D13057
2015-05-28 15:27:08 -07:00
Chad Little
13f9f209df [Redesign] Remove remaining barColor callsites
Summary: Ref T8099, Fixes T8341. Switches all remaining callsites to setBarColor to use setStatusIcon (sans workboards).

Test Plan: Test each of the applications I changed as I could (not Releeph).

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8341, T8099

Differential Revision: https://secure.phabricator.com/D13059
2015-05-28 15:17:34 -07:00
Chad Little
fd47a047e5 [Redesign] Update Phriction UI
Summary: Ref T8099, convert to StatusIcon, clean up some clowny tables. Remove old CSS.

Test Plan: Test history, diff pages. Grep for CSS use.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13056
2015-05-28 14:04:54 -07:00
Chad Little
b0056dd16c [Redesign] Try fa-code icon for open Diffs
Summary: Ref T8099, changes the icon from open to 'code'. Feels slightly better.

Test Plan: btrahan, epriestley

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13055
2015-05-28 13:17:57 -07:00
Chad Little
75673a8e37 [Redesign] Cleanup Harbormaster UI
Summary: Ref T8099, adds StatusIcons in place of barColor. May need to revisit icons. Also fixed incorrect icons used in Drydock.

Test Plan: Visit Harbormaster, Drydock, see proper icons.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13054
2015-05-28 13:00:26 -07:00
epriestley
3699253e49 Merge branch 'master' into redesign-2015 2015-05-28 12:00:06 -07:00
Chad Little
f1dd3d0e9c [Redesign] Update Feed
Summary: Ref T8099, minor spacing improvements and more icons for feed.

Test Plan:
Test feed in Feed, in a Dashboard, Profile, and Project

{F443366}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13045
2015-05-28 11:47:06 -07:00
Chad Little
624b16c4c9 [Redesign] Rebuild Chatlog
Summary: Ref T8099. I use this app daily, so 30 minutes of love is good enough for me.

Test Plan:
Tested with a fake chat.

{F443522}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13046
2015-05-28 11:33:41 -07:00
Chad Little
c0d780543c [Redesign] Update Conduit UI
Summary: Ref T8099, Updates the Conduit UI for the Redesign.

Test Plan: Bop through conduit, add application headers, fix icon colors.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8341, T8099

Differential Revision: https://secure.phabricator.com/D13049
2015-05-28 11:32:51 -07:00
Chad Little
d60f763c89 [Redesign] Update Config UI
Summary: Ref T8099, Sets a StatusIcon instead of a barColor on config status lists.

Test Plan: Review ignored and non-ignored status items.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8341, T8099

Differential Revision: https://secure.phabricator.com/D13050
2015-05-28 11:14:02 -07:00
Chad Little
784a59abd9 [Redesign] Update Daemons UI
Summary: Ref T8099, updates table layouts and StatusIcons in the Daemons application.

Test Plan: Click on lots of different things in Daemons.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13052
2015-05-28 11:13:18 -07:00
Chad Little
cf34185f2e [Redesign] Update Drydock UI
Summary: Ref T8099, Updates Drydock with new StatusIcon over barColor. Making a guess on best icons, feel free to change.

Test Plan: Review Drydock UI in sandbox.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8341, T8099

Differential Revision: https://secure.phabricator.com/D13053
2015-05-28 11:12:49 -07:00
epriestley
5aa4044a9d Fix synthetic (lint) inline comments for comment hiding
Summary: These could cause F442758.

Test Plan: {F442779}

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13042
2015-05-27 15:47:18 -07:00
Chad Little
e81ec738f3 [Redesign] Add back limited header-color options
Summary: Ref T8099. Adds back basic header color options, which change the logo color instead. Also RAINBOW.

Test Plan:
tested each of the new colors.

{F442284}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13040
2015-05-27 14:56:21 -07:00
Chad Little
b24260b04a [Redesign] Add back Advanced Search
Summary: Ref T8099, I failed to test "Advanced Search" which disappeared during the last commit.

Test Plan: Test built-in, saved, and advanced search filters.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13035
2015-05-27 11:41:50 -07:00
lkassianik
50240eda03 Create button should be a dropdown with public and private options
Summary: Ref T8026, Create button should be a dropdown with public and private options

Test Plan: Create both a public and private event. Confirm view policies apply correctly.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8026

Differential Revision: https://secure.phabricator.com/D13033
2015-05-27 11:11:11 -07:00
epriestley
ebb7ca8cbd Convert Owners paths to application transactions
Summary:
Ref T8320. Fixes T8317. Fixes T2831. Fixes T8073. Fixes T7127.

There was a bug with this line:

  for ($ii = 0; $ii < count($paths); $ii++) {

...because the array may be sparse if there have been deletes, so `count($paths)` might be 3, but the real keys could be `1`, `5` and `6`. I think this was the primary issue behind T7127.

The old Editor did a lot of work to try to validate paths. When a path failed to validate, it silently discarded it. This was silly and pointless: it's incredibly bad UX; and it's totally fine if users saves "invalid" paths. This was likely the cause of T8317, and probably the cause of T8073.

T2831 I'm less sure about, but I can't reproduce it and I rewrote all the logic so I suspect it's gone.

This also records and shows edits, so if stuff does keep happening it should be more clear what's going on.

I removed some adjacent stuff:

  - I removed the ability to delete packages. I'll add "disable" in a future diff, plus `bin/remove destroy`, like other objects. Getting rid of this now let me get rid of all the mail stuff.
  - I removed "path validation" where packages would try to automatically update in response to commits. This doesn't necessarily make sense in Git/Mercurial, is sketchy, could easily have been the source of T2831, and seems generally complicated and not very valuable. We could maybe restore it some day, but I'd like to get Owners stable before trying to do crazy stuff like that.

Test Plan: {F437687}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8317, T8073, T7127, T2831, T8320

Differential Revision: https://secure.phabricator.com/D13032
2015-05-27 10:30:26 -07:00
epriestley
da9a61fb70 Use ApplicationTransactions for all non-path edits to Owners packages
Summary: Ref T8320.

Test Plan: {F437431}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D13028
2015-05-27 10:30:08 -07:00
epriestley
009598593f Separate editing of package data and paths in Owners
Summary:
Ref T8320. There's currently one enormous form; split it into a general information form (name, description, owners) and a paths form.

I think this is a little more manageable from both a UX point of view and from an "I have to convert this to use ApplicationTransactions" point of view.

Test Plan:
  - Edited paths.
  - Edited non-path information.
  - Created new packages.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D13026
2015-05-27 10:29:50 -07:00
epriestley
05bd6a1682 Modernize Owners package view UI elements
Summary: Ref T8320. Use modern/standard UI elements to render package details.

Test Plan: {F437131}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D13025
2015-05-27 10:29:31 -07:00
epriestley
6d5d34e6a8 Use ApplicationSearch in Owners
Summary:
Ref T8320. Modernize search and major interfaces.

This slightly regresses some list view and search features; I'll probably restore some later (once the Query has proper `needX(...)` methods) and drop the rest.

Test Plan: Browsed, edited, deleted, and created packages.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D13024
2015-05-27 10:29:01 -07:00
epriestley
e9f4a84a89 Allow inline comments to be individually hidden
Summary:
Ref T7447. Implements per-viewer comment hiding. Once a comment is obsolete or uninteresting, you can hide it completely.

This is sticky per-user.

My hope is that this will strike a better balance between concerns than some of the other approaches (conservative porting, summarization, hide-all).

Specifically, this adds a new action here:

{F435621}

Clicking it completely collapses the comment into a small icon on the previous line, and saves the comment state as hidden for you:

{F435626}

You can click the icon to reveal all hidden comments below the line.

Test Plan:
  - Hid comments.
  - Showed comments.
  - Created, edited, deleted and submitted comments.
  - Used Diffusion comments (hiding is not implemented there yet, but I'd plan to bring it there eventually if it works out in Differential).

Reviewers: btrahan, chad

Reviewed By: btrahan

Subscribers: jparise, yelirekim, epriestley

Maniphest Tasks: T7447

Differential Revision: https://secure.phabricator.com/D13009
2015-05-27 10:28:38 -07:00
epriestley
fcac85d807 Allow configuration of a "staging area" for each repository
Summary:
Ref T8238. This allows configuration of a "staging area" for Git repositories, which is the URI to some Git repository (possibly the same repository).

If a staging area is configured, `arc` will push a copy of anything it creates a diff for there (see next revision). This primarily makes handoff to build systems easier.

This is a bit leaky and I intend for it to eventually be positioned as a less-preferred solution, but from the perspective of build systems it's the same as the real (virtual ref) solution that I want to build.

Test Plan: Ran `arc diff` with various flags, saw appropriate changes copied into the staging area. See also discussion in T8238.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: cburroughs, epriestley

Maniphest Tasks: T8238

Differential Revision: https://secure.phabricator.com/D13019
2015-05-27 10:28:27 -07:00
Chad Little
eab600762e [Redesign] Add Show/Hide functions to PHUIObjectBoxView
Summary: Ref T8099, adds 'show/hide' functions to PHUIObjectBoxView, rolls them out in Application Search for trial.

Test Plan:
Test doing a couple searches in Projects, Audit, etc. Seems to work ok. Design might need more?

{F437207}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13027
2015-05-26 17:35:18 -07:00
lkassianik
46c5e055a2 All day events should obey selected query range in viewer timezone.
Summary: Fixes T8147, All day events should obey selected query range in viewer timezone.

Test Plan: Create all day event May 25, query for events May 26-27. All day event should not be part of the query results list.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8147

Differential Revision: https://secure.phabricator.com/D13023
2015-05-26 14:28:07 -07:00
Aviv Eyal
08a9e0f22a Hide Land to GitHub
Summary:
We don't want to support this right now, so disable it, similar to "Land To Hosted" feature.
Keep to the code as an example for advanced installs.

Ref T182, T8313

Test Plan: load a diff.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T182, T8313

Differential Revision: https://secure.phabricator.com/D13022
2015-05-26 11:28:07 -07:00
epriestley
7ab7c71319 Mark arcanistProjectID as nullable
Reviewers: joshuaspence
2015-05-26 06:53:48 -07:00
Joshua Spence
6e5e6a1a8c Remove "arcanist project" controllers
Summary: Ref T7603. Ref T7604. There is no need for these controllers anymore as the "Arcanist Project" data is not used anywhere. Depends on D12894 and D12898.

Test Plan: Went to `/repository/project/edit/2/` and got a 404.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7603, T7604

Differential Revision: https://secure.phabricator.com/D12897
2015-05-26 07:11:47 +10:00
Joshua Spence
4fc74a6758 Remove arcanist project datasource
Summary: Ref T7604. This class is no longer used.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D13004
2015-05-26 07:10:10 +10:00
Joshua Spence
205adbdda1 Remove "arcanist projects" from Releeph
Summary: Ref T7604. Remove arcanist projects from #releeph.

Test Plan: I don't really know how to use Releeph but I clicked around and nothing seemed too broken.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D12898
2015-05-26 07:07:08 +10:00
epriestley
ea131bb2ef Improve UX for Diffusion mail fields
Summary:
  - Give the fields names and descriptions.
  - When new, default-disabled fields are added, disable them by default even if there's already a config.
  - Be a bit less hacky about `$faux_spec`.

Test Plan: {F432383}

Reviewers: joshuaspence, fabe

Reviewed By: fabe

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13006
2015-05-25 07:18:48 -07:00
Joshua Spence
0c967dd53d Mark "arcanist.projectinfo" as deprecated
Summary: Ref T7604. Mark the `arcanist.projectinfo` #conduit method as deprecated.

Test Plan: Went to the `/config/issue/` page and saw the `Deprecated Conduit Method "arcanist.projectinfo" In Use` setup issue.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D12970
2015-05-25 22:52:41 +10:00
Joshua Spence
be19b31a64 Add repository to audit emails
Summary: This is vaguely related to T5791. Add a "REPOSITORY" header to audit emails so that they can be filtered in Gmail.

Test Plan: Commented on an audit and used `./bin/mail show-outbound` to inspect outbound email.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: fabe, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12997
2015-05-25 22:43:42 +10:00
epriestley
3d2c6f1ed2 Make "Tags" and "Branches" custom fields work properly in Diffusion
Summary: Ref T8295 (vaguely related). This old method has no callsites.

Test Plan: Generated mail, saw "Tags" and "Branches".

Reviewers: fabe, joshuaspence

Reviewed By: fabe, joshuaspence

Subscribers: epriestley

Maniphest Tasks: T8295

Differential Revision: https://secure.phabricator.com/D13000
2015-05-25 05:34:41 -07:00
Fabian Stelzer
f0d16b3047 show merged commits in herald emails for merge commits
Summary:
Includes a new Block in Herad emails which tells the user about which commits were merged in a merge commit
Otherwise the email would just say "Merge branch XYZ". Ref T8295

Test Plan: imported various commits (and merges) and watched resulting herald emails for all of them

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8295

Differential Revision: https://secure.phabricator.com/D12993
2015-05-25 04:49:13 -07:00
Joshua Spence
1b12249b2c Fix some format strings
Summary: These format strings use `%d` instead of `%s`.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12996
2015-05-25 21:29:30 +10:00
Joshua Spence
d6817d00ca Add encoding information to "repository.query"
Summary: Ref T7604. Add `encoding` information to the `repository.query` #conduit query.

Test Plan: Changed repository encoding from the UI and saw the encoding returned by the Conduit call.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D12992
2015-05-25 20:50:23 +10:00
Joshua Spence
635ea2cbaf Remove arcanist projects from Herald
Summary: Ref T7604. Remove arcanist projects from Herald. Depends on D12894 and D12957.

Test Plan: See D12957.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: johnny-bit, Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D12896
2015-05-25 19:11:22 +10:00
Joshua Spence
f5c9b9c014 Make Herald rules more resilient
Summary:
Make Herald conditions and actions more resilient (see discussion in D12896). This protects against invalid rules, which may have been valid in the past but are no longer valid. Specifically:

  - If a rule has an invalid field, the conditions fail and the actions do not execute.
  - The transcript shows that the rule failed because of an invalid field, and points at the issue.
  - If a rule has an invalid action, that action fails but other actions execute.
  - The transcript shows that the action failed.
  - Everything else (particularly, other rules) continues normally in both cases.
  - The edit interface is somewhat working when editing an invalid rule, but it could use some further improvements.

Test Plan:
  # Ran this rule on a differential revision and saw the rule fail in the transcript.
  # Was able to submit a differential without receiving an `ERR-CONDUIT-CORE`.
  # Edited the Herald rule using the UI and was able to save the rule succesfully.
  # Ran this rule on a differential revision and saw one success and one failure in the transcript.
  # Was able to submit a differential without receiving an `ERR-CONDUIT-CORE`.
  # Edited the Herald rule using the UI. Clicking save caused a `HeraldInvalidActionException` to be thrown, but maybe this is okay.

Differential Revision: http://phabricator.local/D41
2015-05-25 19:09:23 +10:00