summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-19 10:04:23 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-19 10:04:23 +0100
commit02fe5d60c0a6664bb86254347ce31467da2d90c3 (patch)
treefe1420806e453a14a63b4f16ad2d566a8c9a0d1a /indra/newview/llviewerinventory.cpp
parentcd0ab5b41eda85b9cb4855f61c3f7e4ca5150797 (diff)
parentb550bb0f09197c35b80d18d540761a7831c3e89b (diff)
merge from viewer-public
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index da8832b1a2..a2331bd69a 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1688,6 +1688,20 @@ bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const
return ((curr_mask & mask) == mask);
}
+PermissionMask LLViewerInventoryItem::getPermissionMask() const
+{
+ const LLPermissions& permissions = getPermissions();
+
+ BOOL copy = permissions.allowCopyBy(gAgent.getID());
+ BOOL mod = permissions.allowModifyBy(gAgent.getID());
+ BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
+ PermissionMask perm_mask = 0;
+ if (copy) perm_mask |= PERM_COPY;
+ if (mod) perm_mask |= PERM_MODIFY;
+ if (xfer) perm_mask |= PERM_TRANSFER;
+ return perm_mask;
+}
+
//----------
void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name)