From bee76e305214598b2cb148e399d86e28d80287ca Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 6 Jun 2013 17:59:16 -0400
Subject: [PATCH] SH-4166 WIP - fix for a permissions issue that was preventing
 cof-created links from being reordered in outfits.

---
 indra/newview/llinventorymodel.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index c0c48d6695b..532d3a34958 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1247,6 +1247,13 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS
 						BOOL rv = new_link->unpackMessage(link_map);
 						if (rv)
 						{
+							LLPermissions default_perms;
+							default_perms.init(gAgent.getID(),gAgent.getID(),LLUUID::null,LLUUID::null);
+							default_perms.initMasks(PERM_NONE,PERM_NONE,PERM_NONE,PERM_NONE,PERM_NONE);
+							new_link->setPermissions(default_perms);
+							LLSaleInfo default_sale_info;
+							new_link->setSaleInfo(default_sale_info);
+							//LL_DEBUGS("Inventory") << "creating link from llsd: " << ll_pretty_print_sd(link_map) << llendl;
 							items_created[link_id] = new_link;
 							const LLUUID& parent_id = new_link->getParentUUID();
 							cat_deltas[parent_id]++;
-- 
GitLab