More reliable preview perm checks

This commit is contained in:
Siana Gearz
2012-02-02 09:52:34 +01:00
parent f68211d83e
commit 4ffa06ae07
3 changed files with 12 additions and 19 deletions

View File

@@ -73,29 +73,14 @@ LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const
translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
}
mIsCopyable = false;
// preload the animation
if(item)
{
gAgentAvatarp->createMotion(item->getAssetUUID());
const LLPermissions& perm = item->getPermissions();
U32 mask = PERM_NONE;
if(perm.getOwner() == gAgent.getID())
{
mask = perm.getMaskBase();
}
else if(gAgent.isInGroup(perm.getGroup()))
{
mask = perm.getMaskGroup();
}
else
{
mask = perm.getMaskEveryone();
}
if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
{
mIsCopyable = true;
}
mIsCopyable = (perm.getCreator() == gAgent.getID());
}
switch ( activate )