summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-01-31 18:45:37 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-01-31 18:45:37 +0200
commitaec5fc3607b8efb5cc3d035df978e59f9ac5bce2 (patch)
treeb1f6413325f5081776deb2a7217fc483fc8b0a3b /indra
parent531ad5b3ec1b6785bf6cde04c1d7203233b552a2 (diff)
SL-9924 EEP Environment Settings permissions can be dropped by Save As button
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp14
-rw-r--r--indra/newview/llfloatereditextdaycycle.h2
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp20
-rw-r--r--indra/newview/llfloaterfixedenvironment.h1
4 files changed, 31 insertions, 6 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index ec59cb271d..c16eb11293 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -181,7 +181,7 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) :
mIsDirty(false),
mCanCopy(false),
mCanMod(false),
- mMakeNoTrans(false),
+ mCanTrans(false),
mCloneTrack(nullptr),
mLoadTrack(nullptr),
mClearTrack(nullptr)
@@ -325,7 +325,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
{
mCanCopy = true;
mCanMod = true;
- mMakeNoTrans = false;
+ mCanTrans = true;
setEditDefaultDayCycle();
}
@@ -1394,7 +1394,7 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
mInventoryId.setNull();
mCanCopy = true;
mCanMod = true;
- mMakeNoTrans = false;
+ mCanTrans = true;
return;
}
@@ -1427,6 +1427,7 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
mCanCopy = mInventoryItem->getPermissions().allowCopyBy(gAgent.getID());
mCanMod = mInventoryItem->getPermissions().allowModifyBy(gAgent.getID());
+ mCanTrans = mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
mExpectingAssetId = mInventoryItem->getAssetUUID();
LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(),
@@ -1462,6 +1463,11 @@ void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::pt
else
settings->setFlag(LLSettingsBase::FLAG_NOMOD);
+ if (mCanTrans)
+ settings->clearFlag(LLSettingsBase::FLAG_NOTRANS);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOTRANS);
+
if (mInventoryItem)
settings->setName(mInventoryItem->getName());
@@ -2038,7 +2044,7 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForInsertion(LLUUID item_id, LLUUID
S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
if (opt == 0)
{
- mMakeNoTrans = true;
+ mCanTrans = false;
mEditDay->setFlag(LLSettingsBase::FLAG_NOTRANS);
cb();
}
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index f50c9f7e5f..311bbd52dc 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -238,7 +238,7 @@ private:
bool mIsDirty;
bool mCanCopy;
bool mCanMod;
- bool mMakeNoTrans;
+ bool mCanTrans;
edit_commit_signal_t mCommitSignal;
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 5eac6b317b..dfd60acb50 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -117,7 +117,8 @@ LLFloaterFixedEnvironment::LLFloaterFixedEnvironment(const LLSD &key) :
mInventoryItem(nullptr),
mIsDirty(false),
mCanCopy(false),
- mCanMod(false)
+ mCanMod(false),
+ mCanTrans(false)
{
}
@@ -257,6 +258,7 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId)
mInventoryId.setNull();
mCanMod = true;
mCanCopy = true;
+ mCanTrans = true;
return;
}
@@ -288,6 +290,7 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId)
mCanCopy = mInventoryItem->getPermissions().allowCopyBy(gAgent.getID());
mCanMod = mInventoryItem->getPermissions().allowModifyBy(gAgent.getID());
+ mCanTrans = mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(),
[this](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoaded(asset_id, settings, status); });
@@ -348,6 +351,21 @@ void LLFloaterFixedEnvironment::onAssetLoaded(LLUUID asset_id, LLSettingsBase::p
if (mInventoryItem)
mSettings->setName(mInventoryItem->getName());
+ if (mCanCopy)
+ settings->clearFlag(LLSettingsBase::FLAG_NOCOPY);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOCOPY);
+
+ if (mCanMod)
+ settings->clearFlag(LLSettingsBase::FLAG_NOMOD);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOMOD);
+
+ if (mCanTrans)
+ settings->clearFlag(LLSettingsBase::FLAG_NOTRANS);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOTRANS);
+
updateEditEnvironment();
syncronizeTabs();
refresh();
diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h
index 12fa64e733..f694e59281 100644
--- a/indra/newview/llfloaterfixedenvironment.h
+++ b/indra/newview/llfloaterfixedenvironment.h
@@ -102,6 +102,7 @@ protected:
LLHandle<LLFloater> mInventoryFloater;
bool mCanCopy;
bool mCanMod;
+ bool mCanTrans;
void onInventoryCreated(LLUUID asset_id, LLUUID inventory_id);
void onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results);