FIRE-15499: Fix inventory items can be moved out of locked RLV folders via "Move to Default Folder" option

Ansariel 2015-02-06 18:12:43 +01:00
parent bc473a0548
commit 830c9eb1a1
2 changed files with 9 additions and 1 deletions

View File

@ -684,7 +684,9 @@ void LLInvFVBridge::checkMoveToDefaultFolder(menuentry_vec_t& items, menuentry_v
if (isAgentInventory() && !isOutboxFolder() && !isProtectedFolder(true) && obj &&
obj->getActualType() != LLAssetType::AT_CATEGORY &&
obj->getActualType() != LLAssetType::AT_LINK_FOLDER &&
obj->getActualType() != LLAssetType::AT_LINK
obj->getActualType() != LLAssetType::AT_LINK &&
(!RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY) ||
RlvFolderLocks::instance().canMoveItem(obj->getUUID(), getInventoryModel()->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(obj->getActualType()) ) ))
)
{
items.push_back(std::string("Move to Default Folder"));

View File

@ -1241,6 +1241,12 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
continue;
}
if (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY) &&
!RlvFolderLocks::instance().canMoveItem(obj->getUUID(), model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(obj->getActualType()) ) ))
{
continue;
}
LLUUID target_cat_id = model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(obj->getActualType()));
if (target_cat_id.notNull())
{