From 2ee39e7df04161655c6d2476b39bda25bcd7380c Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Wed, 19 Sep 2018 16:54:53 +0300
Subject: SL-9665 FIXED [EEP] "Rename" greyed out for assets in My Environments

---
 indra/newview/llinventorybridge.cpp | 10 ++++++++++
 indra/newview/llinventorybridge.h   |  1 +
 2 files changed, 11 insertions(+)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 8d084f3ece..3dc138af7f 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -7021,6 +7021,16 @@ BOOL LLSettingsBridge::renameItem(const std::string& new_name)
     return LLItemBridge::renameItem(new_name);
 }
 
+BOOL LLSettingsBridge::isItemRenameable() const
+{
+    LLViewerInventoryItem* item = getItem();
+    if (item)
+    {
+        return (item->getPermissions().allowModifyBy(gAgent.getID()));
+    }
+    return FALSE;
+}
+
 bool LLSettingsBridge::canUpdateParcel() const
 {
     return LLEnvironment::instance().canAgentUpdateParcelEnvironment();
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 77d0fa4b04..ffe59b93e5 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -625,6 +625,7 @@ public:
     virtual BOOL	isMultiPreviewAllowed() { return FALSE; }
     virtual void	buildContextMenu(LLMenuGL& menu, U32 flags);
     virtual BOOL    renameItem(const std::string& new_name);
+    virtual BOOL    isItemRenameable() const;
     virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; }
 
 protected:
-- 
cgit v1.2.3