1. 17 Nov, 2014 1 commit
    • epriestley's avatar
      Allow Phabricator to accept Conduit requests signed with an SSH key · 657b36dd
      epriestley authored
      Summary:
      Ref T4209.  Depends on D10402.
      
      This updates Conduit to support authenticating calls from other servers by signing the request parameters with the sending server's private key and verifying it with the public key stored in the database.
      
      Test Plan:
        - Made like 500 bad calls using the stuff in D10402.
        - Made a few valid calls using the stuff in D10402.
      
      Reviewers: hach-que, btrahan, #blessed_reviewers
      
      Reviewed By: btrahan, #blessed_reviewers
      
      Subscribers: epriestley, Korvin
      
      Maniphest Tasks: T6240, T4209
      
      Differential Revision: https://secure.phabricator.com/D10401
      657b36dd
  2. 16 Nov, 2014 1 commit
    • epriestley's avatar
      Add almanac.queryservices Conduit API method · 2ac98771
      epriestley authored
      Summary:
      Ref T5833. Just building one query for now which returns the whole binding + interface + network + device tree. Maybe this will get split up in the future.
      
      This will allow web hosts to call the central Almanac and pull instance configuration, authenticating with SSH.
      
      Test Plan: {F234443}
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      Subscribers: chad, epriestley
      
      Maniphest Tasks: T5833
      
      Differential Revision: https://secure.phabricator.com/D10862
      2ac98771
  3. 15 Nov, 2014 4 commits
  4. 14 Nov, 2014 5 commits
    • Bob Trahan's avatar
      Config - add setup checks for minimum and "bad" versions of VCS software. · c9c4dc1d
      Bob Trahan authored
      Summary: Fixes T3046. Git has no minimum or bad versions; svn has no minimum and the bad version of 1.7.1, and mercurial has a minimum of 1.9 and bad versions 2.2 and 2.1. These error messages are specific about the problem but do not include the details as to what specifically is bad about a given version. I don't think that's really necessary - the details don't help solve the problem and its probably booooooring at best to the average user. The details about a bad version are included in the code however.
      
      Test Plan: hardcoded a VCS array to let me test all the VCS stuff. added some phlog() calls to make sure the VCS version parsing stuff was working correctly relative to the version(s) on my system. played around with setting minimum versions and bad versions and saw good results depending on what I set.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T3046
      
      Differential Revision: https://secure.phabricator.com/D10852
      c9c4dc1d
    • epriestley's avatar
      Move directory SQL patch construction to abstract base class · a1f5fc22
      epriestley authored
      Summary:
      Ref T6238. I'm building the instance management application now, but not putting it in the upstream -- I think the only use case for it is to build SAAS. If someone comes up with a use case (maybe a college course that wants to create an instance per-class or something?) we could open it up eventually, but it seems cleaner to keep it out of the upstream until we have such a use case.
      
      I need to add schema patches. Make it easier for a subclass to just "add all the patches in this directory", like "autopatches/" works.
      
      Test Plan:
        - Ran `bin/storage status`, saw all normal patches still valid.
        - In some future diff, the instances application will use this to apply patches.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      Subscribers: epriestley
      
      Maniphest Tasks: T6238
      
      Differential Revision: https://secure.phabricator.com/D10848
      a1f5fc22
    • Scott Kroll's avatar
      Allow config get to work when db is not functional · 84f741f4
      Scott Kroll authored
      Summary: Fixes T6554.
      
      Test Plan:
      Run `bin/config get mysql.host` when no db is functional. Should not get an exception, but should see:
      ```
      lang=json
      {
        "config" : [
          {
            "key"       : "mysql.host",
            "source"    : "local",
            "value"     : null,
            "status"    : "unset",
            "errorInfo" : null
          },
          {
            "key"       : "mysql.host",
            "source"    : "database",
            "value"     : null,
            "status"    : "error",
            "errorInfo" : "Database source is not configured properly"
          }
        ]
      }
      ```
      
      Reviewers: #blessed_reviewers, epriestley
      
      Reviewed By: #blessed_reviewers, epriestley
      
      Subscribers: epriestley
      
      Maniphest Tasks: T6554
      
      Differential Revision: https://secure.phabricator.com/D10851
      84f741f4
    • Bob Trahan's avatar
      Phriction - restore diff link · b8528310
      Bob Trahan authored
      Summary: Fixes T6472. I was curious to see how many reports we'd get but we didn't get any I know of... Still, this is a nice convenient link.
      
      Test Plan:
      edited a wiki doc title + body. ran /bin/mail to see the body and liked what I saw
      
      ```TEXT BODY
      btrahan changed the title from "new title is a good thing" to "new title is a good thing asdsadsadsadsada".
      btrahan edited the document content.
      
      DOCUMENT DIFF
        http://phalanx.dev/phriction/diff/36/?l=3&r=4
      
      DOCUMENT DETAIL
        http://phalanx.dev/w/```
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T6472
      
      Differential Revision: https://secure.phabricator.com/D10850
      b8528310
    • Bob Trahan's avatar
      Audit - delete duplicate audit requests and add unique key · 310373eb
      Bob Trahan authored
      Summary: Fixes T1768. This is mostly a data cleanliness issue as duplicate rows don't really do anything, but let's clear it up now.
      
      Test Plan: made some duplicate rows by adding the same auditor multiple times. ran ./bin/storage upgrade and it worked perfectly!
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T1768
      
      Differential Revision: https://secure.phabricator.com/D10849
      310373eb
  5. 13 Nov, 2014 3 commits
    • Bob Trahan's avatar
      Transactions - introduce a buildTransactionTimeline function · 3fd16a9b
      Bob Trahan authored
      Summary: ...way way down in PhabricatorController. Use it on ManiphestTaskDetailController to test it. Ref T4712. I think the pager logic to be added as part of T4712 can safely reside entirely within this method. As I said earlier, 5 parameters is a lot, so I don't really want to add more. Next diff would do the pagination logic and the diff after that would deploy it everywhere. If while deploying it everywhere I find something off, that will be a different diff.
      
      Test Plan: viewed maniphest tasks and they looked as spiffy as ever.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T4712
      
      Differential Revision: https://secure.phabricator.com/D10844
      3fd16a9b
    • epriestley's avatar
      Fix "edit multiple reviewers" string · e05d0237
      epriestley authored
      Summary:
      Fixes T6543. This was slightly trickier than I thought.
      
      The actual inputs to this are: author, total affected count, added count, added list, removed count, removed list.
      
      We weren't accounting for "total affected count" (used to select the correct word for "reviewers", e.g. "reviewers-few" vs "reviewers-many").
      
      Test Plan: {F233357}
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Subscribers: epriestley
      
      Maniphest Tasks: T6543
      
      Differential Revision: https://secure.phabricator.com/D10846
      e05d0237
    • epriestley's avatar
      Add a dialog explaining what happened to wiki pages · 0d47b8af
      epriestley authored
      Summary: Ayep.
      
      Test Plan: {F233319}
      
      Reviewers: btrahan, chad
      
      Reviewed By: chad
      
      Subscribers: epriestley
      
      Differential Revision: https://secure.phabricator.com/D10845
      0d47b8af
  6. 12 Nov, 2014 10 commits
    • lkassianik's avatar
      T5015, Allow Herald rules for Maniphest to act on task status changes · 3d2e03d0
      lkassianik authored
      Summary: Fixes T5015, Allow Herald rules for Maniphest to act on task status changes.
      
      Test Plan: Create Herald rule for Maniphest tasks to flag a task with status "wontfix". Change status of Maniphest task to "wontfix". Task should be flagged.
      
      Reviewers: #blessed_reviewers, epriestley
      
      Reviewed By: #blessed_reviewers, epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T5015
      
      Differential Revision: https://secure.phabricator.com/D10842
      3d2e03d0
    • Bob Trahan's avatar
      diffusion / differential - better handle case where no comment selected · 22551d10
      Bob Trahan authored
      Summary: Right now, if no comment is selected the JS executes and throws an exception. Instead, if nothing is selected just do nothing. Fixes T6107.
      
      Test Plan: opened up a commit in diffusion with an inline comment. pressed 'r' and saw no exceptions and nothing happen. pressed 'n' to select the next inline comment and then 'r' and it worked. opened up a commit in diffusion without any inline comments. pressed 'r' and saw no exceptions and nothing happen. opened up a diff in differential with an inline comment. pressed 'r' and saw no exceptons and nothing happened. pressed 'n' to select the next inline comment and then 'r' and it worked.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T6107
      
      Differential Revision: https://secure.phabricator.com/D10843
      22551d10
    • Bob Trahan's avatar
      Config - improve lock message for option `phabricator.uninstalled-applications` · aeb3a12e
      Bob Trahan authored
      Summary: Fixes T6175. This particular option is only editable via the Applications application so let the user know that.
      
      Test Plan: saw error message and clicked through to applications app. tried another locked option and saw old message
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T6175
      
      Differential Revision: https://secure.phabricator.com/D10841
      aeb3a12e
    • Bob Trahan's avatar
      Diffusion - default hosting options on during repository creation · 786232c4
      Bob Trahan authored
      Summary: ...if pertinent environment variables are set that is... Fixes T4151. This is the last piece in making repository creation somewhat easier.
      
      Test Plan: made a new repo and noted that http serving was on r/w and ssh serving was still off, as expected for my environment configuration
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T4151
      
      Differential Revision: https://secure.phabricator.com/D10839
      786232c4
    • epriestley's avatar
      Improve Phriction page move dialog · 120a7d91
      epriestley authored
      Summary:
      Fixes T5492. I figured this would be easier to just fix than write a guide for; it actually took me an hour, but I spent like 75% of that futzing with my editor.
      
        - The Move controller currently accepts either a slug or an ID. I can't find any callsites which pass a slug, and this doesn't make sense. Pretty sure this was copy/pasted from Edit or something. Only accept IDs.
        - Slightly modernize the Move controller (newDialog(), handleRequest(), $viewer).
        - When the user enters a bad slug, warn them that we're going to fix it for them and let them accept or reject the changes.
        - Don't prefill the edit note (this feels inconsistent/unusual).
        - On the form, label the input "Path" instead of "URI".
        - Show the old path, to help remind the user what the input should look like.
        - When a user tries to do a no-op move, show a more tailored message.
        - When the user tries to do an overwriting move, explain how they can fix it.
        - When normalizing a slug like `/question/???/mark/`, make it normalize to `/question/_/mark`.
      
      Test Plan:
        - Tried to move a document to itself.
        - Tried to overwrite a document.
        - Did a bad-path move, accepted corrected path.
        - Did a good-path move.
        - Did a path move with a weird component like `/???/`.
        - Added and executed unit tests.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      Subscribers: epriestley
      
      Maniphest Tasks: T5492
      
      Differential Revision: https://secure.phabricator.com/D10838
      120a7d91
    • epriestley's avatar
      Fix minor issues with PhrictionDocumentQuery · 99bcf06c
      epriestley authored
      Summary:
      
        - Order checks used `=` but intended `==`. We could probably write a lint rule for this.
        - Selecting `*` with a join could pick (for example) `id` columns from both the document and content tables and end up using the wrong one.
        - `%Q` expects a string and chokes on `null`.
      
      Auditors: btrahan
      99bcf06c
    • lkassianik's avatar
      T4666, Support Herald in Phriction · 8e1a4eef
      lkassianik authored
      Summary: Fixes T4666, add Herald rules to Phriction Documents
      
      Test Plan: add Herald rule to flag if title contains "xyz", create Phriction Document with title "xyz". Phriction Document should be flagged.
      
      Reviewers: epriestley, #blessed_reviewers
      
      Reviewed By: epriestley, #blessed_reviewers
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T4666
      
      Differential Revision: https://secure.phabricator.com/D10830
      8e1a4eef
    • lkassianik's avatar
      Ref T6500, Duplicated tasks should be marked more visibly as duplicates · 95df7717
      lkassianik authored
      Summary: When merging tasks, the corresponding transaction on the merged task should be black, and the transaction on the ultimate task should be green.
      
      Test Plan: Create two tasks, merge one into the other, merged task transaction is black, the surviving task should show a green transaction.
      
      Reviewers: epriestley, #blessed_reviewers
      
      Reviewed By: epriestley, #blessed_reviewers
      
      Subscribers: chad, Korvin, epriestley
      
      Maniphest Tasks: T6500
      
      Differential Revision: https://secure.phabricator.com/D10827
      95df7717
    • Bob Trahan's avatar
      Phriction - fix "unknown policy" on document create · 36c46d80
      Bob Trahan authored
      Summary: when creating new documents the policy object wasn't being initialized properly. update the code to use the new handy initializeNewDocument method. Fixes T6527.
      
      Test Plan: viewed a doc at /w/asdsadsadsdas/ and saw the correct policy setting
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T6527
      
      Differential Revision: https://secure.phabricator.com/D10837
      36c46d80
    • epriestley's avatar
      Fix Phriction document migration after project magic removal · ac87ab27
      epriestley authored
      Summary: See <https://github.com/phacility/phabricator/issues/760>. We removed these methods in D10832 but still need the migration to be able to do project checks.
      
      Test Plan: Ran on a test wiki with `/`, `/projects/` and `/projects/example/`. The first two pages didn't try to use project policies; the third one did.
      
      Reviewers: btrahan, chad
      
      Reviewed By: chad
      
      Subscribers: epriestley
      
      Differential Revision: https://secure.phabricator.com/D10836
      ac87ab27
  7. 11 Nov, 2014 7 commits
  8. 09 Nov, 2014 2 commits
    • Merlijn van Deen's avatar
      Add icon, color and profile image to project.query · ce55bb1d
      Merlijn van Deen authored
      Summary:
       - The icon CSS tag is transformed through the new function
         PhabricatorProjectIcon::getAPIName($key), which returns
         a name without fa-.
      
       - Color is a trivial lookup
       - Profile image returns the PHID or null if not available
      
      Test Plan:
       - Create two projects, with different icon and color,
         one with and one without profile image.
       - Request information on both using project.query
      Then:
       [ ] Confirm icon and colors are correct for both projects
       [ ] Confirm image PHID is correct
       [ ] Confirm image PHID is null for the project without image
      
      Reviewers: #blessed_reviewers, epriestley
      
      Reviewed By: #blessed_reviewers, epriestley
      
      Subscribers: yuvipanda, Korvin, legoktm, epriestley
      
      Maniphest Tasks: T6501
      
      Differential Revision: https://secure.phabricator.com/D10823
      ce55bb1d
    • Bob Trahan's avatar
      Phriction - if you can't edit x/y don't allow creating x/y/z · 6f971a0f
      Bob Trahan authored
      Summary: ...how do you lock down entire areas otherwise? Fixes T6496.
      
      Test Plan: used user 1 to create x/y that user 2 can't edit. tried to create x/y/z as user 2 and got a big ole error dialogue.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin, epriestley
      
      Maniphest Tasks: T6496
      
      Differential Revision: https://secure.phabricator.com/D10819
      6f971a0f
  9. 08 Nov, 2014 4 commits
  10. 07 Nov, 2014 3 commits