summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-11 10:22:50 -0800
committerJames Cook <james@lindenlab.com>2009-12-11 10:22:50 -0800
commita87b99cd950de20dc55e1ae6ce7186863a554326 (patch)
tree43d1385397cbefac07934588824a3d0716fc6365 /indra/newview/llviewerinventory.cpp
parentb26694f2ab4d88fb8a0e4b1f0e8733f111af4522 (diff)
parentc74d5c483cbd75c5e2a0b17c8980755a9932c53a (diff)
Merge, fixed conflict in panel_preferences_sound.xml
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)