summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-09-28 17:30:48 -0700
committerMerov Linden <merov@lindenlab.com>2014-09-28 17:30:48 -0700
commit896f48229e577b1bcf94f2cb80d73a6bf1a9330c (patch)
treefb0b1b61b3f82ec21ad88d5dc7017ff58bfb06cc /indra/newview/llviewerinventory.cpp
parent5bde459c79f65fb4846dd1b24fdfa974e18d529e (diff)
DD-211 : Verify that the items have the right permissions when dropping in a stock folder, add an adequate message when failing to drop in a stock folder.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rwxr-xr-xindra/newview/llviewerinventory.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index a1f896d01f..d7a18fa48c 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -818,8 +818,10 @@ bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item)
LLInventoryModel::cat_array_t* cat_array;
LLInventoryModel::item_array_t* item_array;
gInventory.getDirectDescendentsOf(getUUID(),cat_array,item_array);
- // Destination stock folder must be empty OR types of incoming and existing items must be identical
- accept = (!item_array->size() || (item_array->at(0)->getInventoryType() == inv_item->getInventoryType()));
+ // Destination stock folder must be empty OR types of incoming and existing items must be identical and have the same permissions
+ accept = (!item_array->size() ||
+ ((item_array->at(0)->getInventoryType() == inv_item->getInventoryType()) &&
+ (item_array->at(0)->getPermissions().getMaskNextOwner() == inv_item->getPermissions().getMaskNextOwner())));
}
}
return accept;