summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.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/llviewerinventory.cpp
parentc971462f6e89c7a97d17010fbd74b664b2d9dbb9 (diff)
Fix for EXT-3368 - "Save Texture" functionality was no longer respecting perms
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 9856cb2b7f..78cee15384 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1379,6 +1379,25 @@ LLViewerInventoryCategory *LLViewerInventoryItem::getLinkedCategory() const
return NULL;
}
+bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const
+{
+ const LLPermissions& perm = getPermissions();
+ PermissionMask curr_mask = PERM_NONE;
+ if(perm.getOwner() == gAgent.getID())
+ {
+ curr_mask = perm.getMaskBase();
+ }
+ else if(gAgent.isInGroup(perm.getGroup()))
+ {
+ curr_mask = perm.getMaskGroup();
+ }
+ else
+ {
+ curr_mask = perm.getMaskEveryone();
+ }
+ return ((curr_mask & mask) == mask);
+}
+
//----------
void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name)