1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00
phorge-phorge/src/applications/harbormaster
epriestley 5ee4a1a306 Give Harbormaster Build Plans real policies
Summary:
Ref T9614. Currently, a lot of Build Plan behavior is covered by a global "can manage" policy.

One install in particular is experiencing difficulty with warring factions within engineering aborting one another's builds.

As a first step to remedy this, and also generally make Harbormaster more flexible and bring it in line with other applications in terms of policy power:

  - Give Build Plans normal view/edit policies.
  - Require "Can Edit" to run a plan manually.

Having "Can View" on plans may be a little weird in some cases (the status of a Buildable might be bad because of a build you can't see) but we can cross that bridge when we come to it.

Next change here will require "Can Edit" to abort a build. This will reasonably allow installs to reserve pause/abort for administrators/adults. (I might let anyone restart a plan, though?)

Test Plan:
  - Created a new build plan.
  - Verified defaults were inherited from application defaults (swapped them around, too).
  - Saved build plan.
  - Edited policies.
  - Verified autoplans get the right policies.
  - Verified old plans got migrated properly.
  - Tried to run a plan I couldn't edit (denied).
  - Ran a plan from CLI with `bin/harbormaster`.
  - Tried to create a plan with an unprivileged user.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9614

Differential Revision: https://secure.phabricator.com/D14321
2015-10-26 12:38:21 -07:00
..
__tests__ Add "Autoplans" to Harbormaster 2015-06-21 09:04:21 -07:00
application Give Harbormaster Build Plans real policies 2015-10-26 12:38:21 -07:00
artifact In Harbormaster, make sure artifacts are destroyed even if a build is aborted 2015-10-05 05:58:53 -07:00
autoplan Give "Arcanist Client Results" a more clear name 2015-09-09 19:18:08 -07:00
capability Give Harbormaster Build Plans real policies 2015-10-26 12:38:21 -07:00
conduit Add harbormaster.createartifact 2015-08-15 07:28:56 -07:00
config Add getGroup to ConfigOptions 2015-02-09 13:10:56 -08:00
controller Give Harbormaster Build Plans real policies 2015-10-26 12:38:21 -07:00
customfield Use Drydock authorizations when acquiring leases 2015-10-12 17:02:35 -07:00
editor Give Harbormaster Build Plans real policies 2015-10-26 12:38:21 -07:00
engine Allow builds to have parameters 2015-10-02 06:32:08 -07:00
event Show external build links in applications 2015-08-15 07:29:26 -07:00
exception Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
future Allow Harbormaster to run commands on Drydock working copies 2015-09-25 10:43:32 -07:00
herald Allow builds to have parameters 2015-10-02 06:32:08 -07:00
interface Move build variables into HarbormasterBuildableInterface 2014-06-20 12:58:23 +10:00
management Allow builds to have parameters 2015-10-02 06:32:08 -07:00
phid Use Drydock authorizations when acquiring leases 2015-10-12 17:02:35 -07:00
query Show external build links in applications 2015-08-15 07:29:26 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
step Make WorkingCopy build step slightly more durable 2015-10-25 14:53:24 -07:00
stepgroup Put Drydock build steps into their own group in Harbormaster 2015-10-05 15:59:35 -07:00
storage Give Harbormaster Build Plans real policies 2015-10-26 12:38:21 -07:00
typeahead Give typeahead browse dialogs sensible titles 2015-04-20 10:06:23 -07:00
view Remove leftover code for "postponed" lint and unit status 2015-08-29 22:19:28 +10:00
worker Allow Harbormaster build plans to request additional working copies 2015-09-28 17:57:41 -07:00