summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 9856cb2b7f..5605f425e0 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -43,7 +43,6 @@
#include "llviewercontrol.h"
#include "llconsole.h"
#include "llinventorymodel.h"
-#include "llnotify.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
@@ -519,7 +518,7 @@ bool LLViewerInventoryCategory::fetchDescendents()
std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
- LLInventoryModel::startBackgroundFetch(mUUID);
+ gInventory.startBackgroundFetch(mUUID);
}
else
{ //Deprecated, but if we don't have a capability, use the old system.
@@ -1379,6 +1378,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)