mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
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.
This commit is contained in:
parent
0264d3de45
commit
5f3e9886f7
Notes:
sideshowbarker
2024-07-18 00:53:05 +09:00
Author: https://github.com/krkk
Commit: 5f3e9886f7
Pull-request: https://github.com/SerenityOS/serenity/pull/10997
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue