diff options
author | Karol Kosek <krkk@serenityos.org> | 2021-10-10 01:00:32 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-22 09:03:19 +0100 |
commit | 5f3e9886f713e9712abf8c1ac5b762ed6f89de3d (patch) | |
tree | a7803b385c233d5f7a65554b543cc9305c2571f6 /Userland/DevTools/HackStudio | |
parent | 0264d3de4574f8e397ef6b321f9084a4ef83fdb7 (diff) | |
download | serenity-5f3e9886f713e9712abf8c1ac5b762ed6f89de3d.zip |
HackStudio: Disable the Rename action on insufficient permissions
This patch will disable the Rename action in the project Tree View
if a user does not have write access to the selected file directory.
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 52edaa2881..92f840799f 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -983,6 +983,7 @@ void HackStudioWidget::configure_project_tree_view() return access(m_project->model().full_path(selected_file.parent()).characters(), W_OK) == 0; }); bool has_permissions = it != selections.end(); + m_tree_view_rename_action->set_enabled(has_permissions); m_delete_action->set_enabled(has_permissions); }; |