summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-12-10 16:07:54 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-12-10 16:07:54 -0500
commit9db47b1d4bc9c24adf23f862c729464d9422e6a3 (patch)
tree4ff4fe46e228c33350b6fdb594d33eea586fae0c /indra/newview/llpanelmaininventory.cpp
parentc971462f6e89c7a97d17010fbd74b664b2d9dbb9 (diff)
Fix for EXT-3368 - "Save Texture" functionality was no longer respecting perms
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 9d73fbf21a..cef21e85d6 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1018,28 +1018,10 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata)
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
if (current_item)
{
- bool can_save = false;
- LLInventoryItem *item = gInventory.getItem(current_item->getListener()->getUUID());
- if(item)
+ LLViewerInventoryItem *inv_item = current_item->getInventoryItem();
+ if(inv_item)
{
- const LLPermissions& perm = item->getPermissions();
- U32 mask = PERM_NONE;
- if(perm.getOwner() == gAgent.getID())
- {
- mask = perm.getMaskBase();
- }
- else if(gAgent.isInGroup(perm.getGroup()))
- {
- mask = perm.getMaskGroup();
- }
- else
- {
- mask = perm.getMaskEveryone();
- }
- if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
- {
- can_save = true;
- }
+ bool can_save = inv_item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED);
LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType();
return can_save && (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT);
}