From cae1246359c64b33eccf61b3fd6ddda6a6101418 Mon Sep 17 00:00:00 2001 From: Valerio Bozzolan Date: Thu, 6 Jul 2023 13:31:00 +0200 Subject: [PATCH] Dashboard Tabs: render "Move" buttons grayed out more consistently Summary: If you happen to create a Dashboard by retrieving other people's panels, you were probably affected by this visual bug. It seems that you cannot Move things, but you really can (and that is OK). The reason is, to move things in a Parent Panel, you only need edit permission there, and you do not need to also have edit permissions on every Child Panel. Closes T15492 Test Plan: - From user A: - Create two panels - editable by: User A - From user B: - Create a "Tabs Panel" in a Dashboard - Attach the panels from User A (so, editable by, not you) The meaningful "Move" actions should be not disabled anymore. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15492 Differential Revision: https://we.phorge.it/D25308 --- .../dashboard/paneltype/PhabricatorDashboardTabsPanelType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php index 831229bab1..9bc84d820e 100644 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php @@ -181,7 +181,7 @@ final class PhabricatorDashboardTabsPanelType ->setIcon('fa-chevron-left') ->setHref($prev_uri) ->setWorkflow(true) - ->setDisabled(($prev_key === null) || !$can_edit)); + ->setDisabled($prev_key === null)); $dropdown_menu->addAction( id(new PhabricatorActionView()) @@ -189,7 +189,7 @@ final class PhabricatorDashboardTabsPanelType ->setIcon('fa-chevron-right') ->setHref($next_uri) ->setWorkflow(true) - ->setDisabled(($next_key === null) || !$can_edit)); + ->setDisabled($next_key === null)); $dropdown_menu->addAction( id(new PhabricatorActionView())