Summary: another little piece here that basically just adds some permissions to source editing. serving it up before I do anything too complicated to make sure it seems kosher. in terms of what comes next this form needs to be dynamic based on source type so there'll be some fun there. That said, I plan to implement a more simple "phabricator form" only version to start here and flesh out a few other things like queues with that. Test Plan: set permission to no one for source edit and got a nice error page. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7535
70 lines
1.9 KiB
PHP
70 lines
1.9 KiB
PHP
<?php
|
|
|
|
final class PhabricatorApplicationNuance extends PhabricatorApplication {
|
|
|
|
public function getIconName() {
|
|
return 'nuance';
|
|
}
|
|
|
|
public function getTitleGlyph() {
|
|
return "\xE2\x98\x8E";
|
|
}
|
|
|
|
public function isBeta() {
|
|
return true;
|
|
}
|
|
|
|
public function shouldAppearInLaunchView() {
|
|
// try to hide this even more for now
|
|
return false;
|
|
}
|
|
|
|
public function canUninstall() {
|
|
return true;
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/nuance/' => array(
|
|
'item/' => array(
|
|
'view/(?P<id>[1-9]\d*)/' => 'NuanceItemViewController',
|
|
'edit/(?P<id>[1-9]\d*)/' => 'NuanceItemEditController',
|
|
'new/' => 'NuanceItemEditController',
|
|
),
|
|
'source/' => array(
|
|
'view/(?P<id>[1-9]\d*)/' => 'NuanceSourceViewController',
|
|
'edit/(?P<id>[1-9]\d*)/' => 'NuanceSourceEditController',
|
|
'new/' => 'NuanceSourceEditController',
|
|
),
|
|
'queue/' => array(
|
|
'view/(?P<id>[1-9]\d*)/' => 'NuanceQueueViewController',
|
|
'edit/(?P<id>[1-9]\d*)/' => 'NuanceQueueEditController',
|
|
'new/' => 'NuanceQueueEditController',
|
|
),
|
|
'requestor/' => array(
|
|
'view/(?P<id>[1-9]\d*)/' => 'NuanceRequestorViewController',
|
|
'edit/(?P<id>[1-9]\d*)/' => 'NuanceRequestorEditController',
|
|
'new/' => 'NuanceRequestorEditController',
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
protected function getCustomCapabilities() {
|
|
return array(
|
|
NuanceCapabilitySourceDefaultView::CAPABILITY => array(
|
|
'caption' => pht(
|
|
'Default view policy for newly created sources.'),
|
|
),
|
|
NuanceCapabilitySourceDefaultEdit::CAPABILITY => array(
|
|
'caption' => pht(
|
|
'Default edit policy for newly created sources.'),
|
|
),
|
|
NuanceCapabilitySourceManage::CAPABILITY => array(
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|
|
|