1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 08:12:40 +01:00
phorge-phorge/src/applications/drydock/application/PhabricatorApplicationDrydock.php
James Rhodes ba16df0fed Restructure Drydock so that blueprints are instances in the DB
Summary:
//(this diff used to be about applying policies to blueprints)//

This restructures Drydock so that blueprints are instances in the DB, with an associated implementation class.  Thus resources now have a `blueprintPHID` instead of `blueprintClass` and DrydockBlueprint becomes a DAO.  The old DrydockBlueprint is renamed to DrydockBlueprintImplementation, and the DrydockBlueprint DAO has a `blueprintClass` column on it.

This now just implements CAN_VIEW and CAN_EDIT policies for blueprints, although they are probably not enforced in all of the places they could be.

Test Plan: Used the `create-resource` and `lease` commands.  Closed resources and leases in the UI.  Clicked around the new and old lists to make sure everything is still working.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4111, T2015

Differential Revision: https://secure.phabricator.com/D7638
2013-12-03 11:09:07 +11:00

58 lines
1.5 KiB
PHP

<?php
final class PhabricatorApplicationDrydock extends PhabricatorApplication {
public function getBaseURI() {
return '/drydock/';
}
public function getShortDescription() {
return 'Allocate Software Resources';
}
public function getIconName() {
return 'drydock';
}
public function getTitleGlyph() {
return "\xE2\x98\x82";
}
public function getFlavorText() {
return pht('A nautical adventure.');
}
public function getApplicationGroup() {
return self::GROUP_UTILITIES;
}
public function isBeta() {
return true;
}
public function getRoutes() {
return array(
'/drydock/' => array(
'' => 'DrydockResourceListController',
'blueprint/' => array(
'' => 'DrydockBlueprintListController',
'(?P<id>[1-9]\d*)/' => 'DrydockBlueprintViewController',
'create/' => 'DrydockBlueprintCreateController',
'edit/(?P<id>[1-9]\d*)/' => 'DrydockBlueprintEditController',
),
'resource/' => array(
'' => 'DrydockResourceListController',
'(?P<id>[1-9]\d*)/' => 'DrydockResourceViewController',
'(?P<id>[1-9]\d*)/close/' => 'DrydockResourceCloseController',
),
'lease/' => array(
'' => 'DrydockLeaseListController',
'(?P<id>[1-9]\d*)/' => 'DrydockLeaseViewController',
'(?P<id>[1-9]\d*)/release/' => 'DrydockLeaseReleaseController',
),
'log/' => 'DrydockLogController',
),
);
}
}