diff options
Diffstat (limited to 'indra/newview/llfloatermyenvironment.cpp')
-rw-r--r-- | indra/newview/llfloatermyenvironment.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index 1d2f14532d..21d106c8b1 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -277,9 +277,16 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context) LLUUID asset_id = itemp->getAssetUUID(); std::string name = itemp->getName(); + U32 flags(0); + + if (!itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID())) + flags |= LLSettingsBase::FLAG_NOMOD; + if (!itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + flags |= LLSettingsBase::FLAG_NOTRANS; + if (context == PARAMETER_REGION) { - LLEnvironment::instance().updateRegion(asset_id, name, LLEnvironment::NO_TRACK, -1, -1); + LLEnvironment::instance().updateRegion(asset_id, name, LLEnvironment::NO_TRACK, -1, -1, flags); LLEnvironment::instance().setSharedEnvironment(); } else if (context == PARAMETER_PARCEL) @@ -290,7 +297,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context) LL_WARNS("ENVIRONMENT") << "Unable to determine parcel." << LL_ENDL; return; } - LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, LLEnvironment::NO_TRACK, -1, -1); + LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, LLEnvironment::NO_TRACK, -1, -1, flags); LLEnvironment::instance().setSharedEnvironment(); } else if (context == PARAMETER_LOCAL) |