mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +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: https://github.com/SerenityOS/serenity/commit/5f3e9886f71 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…
Reference in a new issue