diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-14 10:39:59 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-14 10:39:59 -0500 |
commit | aad8d99af2b4a29d055dccb1c3fbea7a46fcb843 (patch) | |
tree | 96b398bd405344f42753e58afbb02092882715cb /indra/newview/llviewerinventory.cpp | |
parent | 3e75137f26c099185677e1160570860e07a56595 (diff) | |
parent | a763409647a5a8d82f2f1c54223b998877c3b72d (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 5417929dbb..8dcd1b8f93 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) |