mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +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
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