diff options
| author | andreykproductengine <akleshchev@productengine.com> | 2015-01-19 16:20:37 +0200 |
|---|---|---|
| committer | andreykproductengine <akleshchev@productengine.com> | 2015-01-19 16:20:37 +0200 |
| commit | be5670b5fff0b6c631e31279e085599e663db804 (patch) | |
| tree | 56572561e3241d2880daeefeecc9188c96fdcd11 /indra/newview/llpanelobjectinventory.cpp | |
| parent | 427191118e65605e03a5369bdebf2c998e54f851 (diff) | |
MAINT-1977 FIXED 'Open' menu item doesn't work for notecard (with 'anyone can copy' permission) in object's content
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
| -rwxr-xr-x | indra/newview/llpanelobjectinventory.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5fd575ee8b..8b927a0c6b 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1167,7 +1167,13 @@ void LLTaskNotecardBridge::openItem() { return; } - if(object->permModify() || gAgent.isGodlike()) + + // Note: even if we are not allowed to modify copyable notecard, we should be able to view it + LLInventoryItem *item = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID)); + BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); + if( item_copy + || object->permModify() + || gAgent.isGodlike()) { LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES); if (preview) |
