Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14048488
D14824.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D14824.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => 'faa11cbc',
+ 'core.pkg.css' => '4cf32aa0',
'core.pkg.js' => 'e0379ae5',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '2de124c9',
@@ -138,7 +138,7 @@
'rsrc/css/phui/phui-image-mask.css' => '5a8b09c8',
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
'rsrc/css/phui/phui-info-view.css' => '6d7c3509',
- 'rsrc/css/phui/phui-list.css' => 'a789942a',
+ 'rsrc/css/phui/phui-list.css' => '9da2aa00',
'rsrc/css/phui/phui-object-box.css' => '407eaf5a',
'rsrc/css/phui/phui-object-item-list-view.css' => '26c30d3f',
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
@@ -812,7 +812,7 @@
'phui-info-panel-css' => '27ea50a1',
'phui-info-view-css' => '6d7c3509',
'phui-inline-comment-view-css' => '0fdb3667',
- 'phui-list-view-css' => 'a789942a',
+ 'phui-list-view-css' => '9da2aa00',
'phui-object-box-css' => '407eaf5a',
'phui-object-item-list-view-css' => '26c30d3f',
'phui-pager-css' => 'bea33d23',
diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php
--- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php
+++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php
@@ -13,7 +13,8 @@
$engine_key = $request->getURIData('engineKey');
$this->setEngineKey($engine_key);
- $engine = PhabricatorEditEngine::getByKey($viewer, $engine_key);
+ $engine = PhabricatorEditEngine::getByKey($viewer, $engine_key)
+ ->setViewer($viewer);
$items = array();
$items[] = id(new PHUIListItemView())
@@ -23,9 +24,12 @@
$sort_create_uri = "/transactions/editengine/{$engine_key}/sort/create/";
$sort_edit_uri = "/transactions/editengine/{$engine_key}/sort/edit/";
- $can_edit = PhabricatorPolicyFilter::hasCapability(
+ $builtins = $engine->getBuiltinEngineConfigurations();
+ $builtin = head($builtins);
+
+ $can_sort = PhabricatorPolicyFilter::hasCapability(
$viewer,
- $engine,
+ $builtin,
PhabricatorPolicyCapability::CAN_EDIT);
$items[] = id(new PHUIListItemView())
@@ -33,14 +37,14 @@
->setName(pht('Reorder Create Forms'))
->setHref($sort_create_uri)
->setWorkflow(true)
- ->setDisabled(!$can_edit);
+ ->setDisabled(!$can_sort);
$items[] = id(new PHUIListItemView())
->setType(PHUIListItemView::TYPE_LINK)
->setName(pht('Reorder Edit Forms'))
->setHref($sort_edit_uri)
->setWorkflow(true)
- ->setDisabled(!$can_edit);
+ ->setDisabled(!$can_sort);
return id(new PhabricatorEditEngineConfigurationSearchEngine())
->setController($this)
diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php
--- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php
+++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php
@@ -39,6 +39,15 @@
$configs = $query->execute();
+ // Do this check here (instead of in the Query above) to get a proper
+ // policy exception if the user doesn't satisfy
+ foreach ($configs as $config) {
+ PhabricatorPolicyFilter::requireCapability(
+ $viewer,
+ $config,
+ PhabricatorPolicyCapability::CAN_EDIT);
+ }
+
if ($is_create) {
$configs = msort($configs, 'getCreateSortKey');
} else {
diff --git a/webroot/rsrc/css/phui/phui-list.css b/webroot/rsrc/css/phui/phui-list.css
--- a/webroot/rsrc/css/phui/phui-list.css
+++ b/webroot/rsrc/css/phui/phui-list.css
@@ -62,6 +62,7 @@
line-height: 18px;
}
+.phabricator-side-menu .phui-list-item-disabled .phui-list-item-href,
.phui-list-sidenav .phui-list-item-disabled .phui-list-item-href {
color: {$lightgreytext};
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 7:55 AM (3 d, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728265
Default Alt Text
D14824.diff (4 KB)
Attached To
Mode
D14824: Straighten out reorder permissions on form configurations
Attached
Detach File
Event Timeline
Log In to Comment