Don't show 'Cut' and 'Delete' options on shared items

This commit is contained in:
Nariman Jelveh 2024-06-15 22:14:14 -07:00
parent 705b9de28c
commit 0dbc6aad0f

View File

@ -860,7 +860,6 @@ function UIItem(options){
}) })
} }
}); });
// ------------------------------------------- // -------------------------------------------
// Copy // Copy
// ------------------------------------------- // -------------------------------------------
@ -1243,7 +1242,7 @@ function UIItem(options){
// ------------------------------------------- // -------------------------------------------
// Cut // Cut
// ------------------------------------------- // -------------------------------------------
if($(el_item).attr('data-immutable') === '0'){ if($(el_item).attr('data-immutable') === '0' && !is_shared_with_me){
menu_items.push({ menu_items.push({
html: i18n('cut'), html: i18n('cut'),
onClick: function(){ onClick: function(){
@ -1312,7 +1311,7 @@ function UIItem(options){
// ------------------------------------------- // -------------------------------------------
// Delete // Delete
// ------------------------------------------- // -------------------------------------------
if($(el_item).attr('data-immutable') === '0' && !is_trashed){ if($(el_item).attr('data-immutable') === '0' && !is_trashed && !is_shared_with_me){
menu_items.push({ menu_items.push({
html: i18n('delete'), html: i18n('delete'),
onClick: async function(){ onClick: async function(){