From f479ed87576648c63e73d3002f344ea186f442a8 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Tue, 21 Oct 2025 05:11:28 +1000 Subject: [PATCH] [FIRE-36028] Fix OpenSim object permissions --- indra/llinventory/llinventory.cpp | 8 +++++++- indra/llinventory/llpermissions.cpp | 2 ++ indra/llinventory/llpermissions.h | 7 +++++++ indra/newview/llstartup.cpp | 4 ++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 9c40acaa62..1977f509d0 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1073,7 +1073,13 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) // TODO - figure out if this should be moved into the noclobber fields above mThumbnailUUID.setNull(); mFavorite = false; - mPermissions.init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null); + // [FIRE-36028] Fix OpenSim object permissions + //mPermissions.init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null); + if (!LLPermissions::getIsInOpenSim()) + { + mPermissions.init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null); + } + // // iterate as map to avoid making unnecessary temp copies of everything LLSD::map_const_iterator i, end; diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp index 03cd7771d4..c49bacf040 100644 --- a/indra/llinventory/llpermissions.cpp +++ b/indra/llinventory/llpermissions.cpp @@ -39,6 +39,8 @@ const LLPermissions LLPermissions::DEFAULT; +bool LLPermissions::sIsInOpenSim = false; // [FIRE-36028] Fix OpenSim object permissions + // No creator = created by system LLPermissions::LLPermissions() { diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index 469eacc5ef..70b29cd312 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -103,6 +103,8 @@ private: // values. bool mIsGroupOwned; + static bool sIsInOpenSim; // [FIRE-36028] Fix OpenSim object permissions + // Correct for fair use - you can never take away the right to // move stuff you own, and you can never take away the right to // transfer something you cannot otherwise copy. @@ -288,6 +290,11 @@ public: inline bool allowOpenSimExportBy(const LLUUID& agent_id) const; // OpenSim export permission #endif + // [FIRE-36028] Fix OpenSim object permissions + static bool getIsInOpenSim() { return sIsInOpenSim; } + static void setupIsInOpenSim(bool is_in_open_sim) { sIsInOpenSim = is_in_open_sim; } + // + // // MISC METHODS and OPERATORS // diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6e0bb1d39d..aebdbea28e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -4886,6 +4886,10 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y // [FIRE-34775] Use PST/PDT when logged into OpenSim LLStringOps::setupUsingPacificTime(!LLGridManager::getInstance()->isInSecondLife()); // + // [FIRE-36028] Fix OpenSim object permissions + LLPermissions::setupIsInOpenSim(!LLGridManager::getInstance()->isInSecondLife()); + // + } // set up the voice configuration. Ultimately, we should pass this up as part of each voice