summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rwxr-xr-xindra/newview/llpreviewnotecard.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 1308d1e9a7..9f88b0db5f 100755
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -218,7 +218,7 @@ void LLPreviewNotecard::loadAsset()
LLPermissions perm(item->getPermissions());
BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE);
BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
- BOOL allow_modify = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE);
+ BOOL allow_modify = canModify(mObjectUUID, item);
if (allow_copy || gAgent.isGodlike())
{
@@ -338,10 +338,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
}
previewEditor->makePristine();
-
- const LLInventoryItem* item = preview->getItem();
- BOOL modifiable = item && gAgent.allowOperation(PERM_MODIFY,
- item->getPermissions(), GP_OBJECT_MANIPULATE);
+ BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem());
preview->setEnabled(modifiable);
preview->mAssetStatus = PREVIEW_ASSET_LOADED;
}