diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-11-04 18:24:36 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-11-04 18:24:36 +0200 |
commit | baf86263e6dc1fe7f964e5885d6bed753554dad7 (patch) | |
tree | 1180955f3e71e66ed4d8d0ab19a575eb8727fd3c /indra | |
parent | 448eff8307324d12c86185f81c9d3896aec153fb (diff) |
SL-12213 Unable to paste no-modify/no-transfer texture
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelobject.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 56aea7db5e..01fa9cc074 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -2449,7 +2449,7 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id) { // User is allowed to copy a texture if: // library asset or default texture, - // or full perm asset exists in user's inventory + // or copy perm asset exists in user's inventory // Library asset or default texture if (gInventory.isObjectDescendentOf(image_id, gInventory.getLibraryRootFolderID()) @@ -2461,7 +2461,7 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id) return true; } - // Search for a full perm asset + // Search for a copy perm asset LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLAssetIDMatches asset_id_matches(image_id); @@ -2475,9 +2475,15 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id) for (S32 i = 0; i < items.size(); i++) { LLViewerInventoryItem* itemp = items[i]; - if (itemp->getIsFullPerm()) + if (itemp) { - return true; + LLPermissions item_permissions = itemp->getPermissions(); + if (item_permissions.allowOperationBy(PERM_COPY, + gAgent.getID(), + gAgent.getGroupID())) + { + return true; + } } } } |