1. 23 Jul, 2014 2 commits
    • Joshua Spence's avatar
      Rename `PHIDType` classes · 97a8700e
      Joshua Spence authored
      Summary: Ref T5655. Rename `PhabricatorPHIDType` subclasses for clarity (see discussion in D9839). I'm not too keen on some of the resulting class names, so feel free to suggest alternatives.
      
      Test Plan: Ran unit tests.
      
      Reviewers: epriestley, #blessed_reviewers
      
      Reviewed By: epriestley, #blessed_reviewers
      
      Subscribers: epriestley, Korvin, hach-que
      
      Maniphest Tasks: T5655
      
      Differential Revision: https://secure.phabricator.com/D9986
      97a8700e
    • Joshua Spence's avatar
      Rename `PhabricatorApplication` subclasses · 86c399b6
      Joshua Spence authored
      Summary: Ref T5655. Some discussion in D9839. Generally speaking, `Phabricator{$name}Application` is clearer than `PhabricatorApplication{$name}`.
      
      Test Plan:
      # Pinned and uninstalled some applications.
      # Applied patch and performed migrations.
      # Verified that the pinned applications were still pinned and that the uninstalled applications were still uninstalled.
      # Performed a sanity check on the database contents.
      
      Reviewers: btrahan, epriestley, #blessed_reviewers
      
      Reviewed By: epriestley, #blessed_reviewers
      
      Subscribers: hach-que, epriestley, Korvin
      
      Maniphest Tasks: T5655
      
      Differential Revision: https://secure.phabricator.com/D9982
      86c399b6
  2. 21 Jul, 2014 1 commit
  3. 29 Apr, 2014 1 commit
    • epriestley's avatar
      Don't show document types in search for uninstalled applications · 8fe27800
      epriestley authored
      Summary:
      Fixes T4917. Currently, if a user doesn't have access to, e.g., Phriction, they still get a checkbox in the search results to search for Wiki Documents. Those results will be filtered anyway, so this is confusing at best.
      
      Instead, bind PHID types to applications. This is a relatively tailored fix; some areas for potential future work:
      
        - Go through every PHID type and bind them all to applications. Vaguely nice to have, but doesn't get us anything for now.
        - If no searchable application is installed, we don't show you an error state. This isn't currently possible ("People" is always installed) but in the interest of generality we could throw an exception or something at least.
        - The elasticserach thing could probably constrain types to visible types, but we don't have a viewer there easily right now.
      
      Test Plan: Uninstalled Phriction, saw the checkbox vanish.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      Subscribers: epriestley
      
      Maniphest Tasks: T4917
      
      Differential Revision: https://secure.phabricator.com/D8904
      8fe27800
  4. 24 Apr, 2014 1 commit
  5. 26 Nov, 2013 1 commit
    • epriestley's avatar
      Normalize the definition of "closed" revision statuses · 1da69111
      epriestley authored
      Summary:
      Currently, "Closed" and "Abandoned" are treated as "closed". I want to add a flag which treats "Accepted" as "Closed", too, for Asana and other companies who use an Asana-like workflow.
      
      The background here is that their workflow is a bit weird. They basically do audits, but have a lot of things which Diffusion doesn't do well right now. This one change makes Differential fit their workflow fairly well, even though it's an audit workflow.
      
      To prepare for this, normalize the definition of "closed" better. We have a few callsites which explicitly check for "ABANDONED || CLOSED", and normalizing this is cleaner anyway.
      
      Also delete the very old COMMITTED status, which has been obsolete for over a year.
      
      Test Plan: Browsed around most/all of the affected interfaces.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Differential Revision: https://secure.phabricator.com/D7653
      1da69111
  6. 22 Oct, 2013 1 commit
    • epriestley's avatar
      Lock policy queries to their applications · 2a5c987c
      epriestley authored
      Summary:
      While we mostly have reasonable effective object accessibility when you lock a user out of an application, it's primarily enforced at the controller level. Users can still, e.g., load the handles of objects they can't actually see. Instead, lock the queries to the applications so that you can, e.g., never load a revision if you don't have access to Differential.
      
      This has several parts:
      
        - For PolicyAware queries, provide an application class name method.
        - If the query specifies a class name and the user doesn't have permission to use it, fail the entire query unconditionally.
        - For handles, simplify query construction and count all the PHIDs as "restricted" so we get a UI full of "restricted" instead of "unknown" handles.
      
      Test Plan:
        - Added a unit test to verify I got all the class names right.
        - Browsed around, logged in/out as a normal user with public policies on and off.
        - Browsed around, logged in/out as a restricted user with public policies on and off. With restrictions, saw all traces of restricted apps removed or restricted.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Differential Revision: https://secure.phabricator.com/D7367
      2a5c987c
  7. 11 Sep, 2013 1 commit
  8. 22 Jul, 2013 3 commits
  9. 21 Jul, 2013 1 commit
    • epriestley's avatar
      Provide basic infrastructure for moving PHIDs, Handles and Object Names to applications · 7ed69966
      epriestley authored
      Summary:
      See discussion in T2715. Currently, PHIDs are all hard coded in the PHID application. In the long run, we need to move them out into actual applications.
      
      A specific immediate issue is Releeph, which uses a very very old and very broken mechanism to inject PHIDs in a way that only sort of works.
      
      Moving forward, every PHID type will be provided by a `PhabricatorPHIDType` subclass, which will manage loading it, etc.
      
      This also moves toward cleaning up the "load objects by name" (where "name" means something like `D12`) code, which is an //enormous// mess and spread across at least 4-5 callsites.
      
      Test Plan: Used `phid.lookup` and `phid.query` to load Slowvotes.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Differential Revision: https://secure.phabricator.com/D6502
      7ed69966