[FIRE-36028] Fix OpenSim object permissions

master
Hecklezz 2025-10-21 05:11:28 +10:00
parent fa7cacc755
commit f479ed8757
4 changed files with 20 additions and 1 deletions

View File

@ -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 // TODO - figure out if this should be moved into the noclobber fields above
mThumbnailUUID.setNull(); mThumbnailUUID.setNull();
mFavorite = false; mFavorite = false;
mPermissions.init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null); // <FS:TJ> [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);
}
// </FS:TJ>
// iterate as map to avoid making unnecessary temp copies of everything // iterate as map to avoid making unnecessary temp copies of everything
LLSD::map_const_iterator i, end; LLSD::map_const_iterator i, end;

View File

@ -39,6 +39,8 @@
const LLPermissions LLPermissions::DEFAULT; const LLPermissions LLPermissions::DEFAULT;
bool LLPermissions::sIsInOpenSim = false; // <FS:TJ/> [FIRE-36028] Fix OpenSim object permissions
// No creator = created by system // No creator = created by system
LLPermissions::LLPermissions() LLPermissions::LLPermissions()
{ {

View File

@ -103,6 +103,8 @@ private:
// values. // values.
bool mIsGroupOwned; bool mIsGroupOwned;
static bool sIsInOpenSim; // <FS:TJ/> [FIRE-36028] Fix OpenSim object permissions
// Correct for fair use - you can never take away the right to // 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 // move stuff you own, and you can never take away the right to
// transfer something you cannot otherwise copy. // transfer something you cannot otherwise copy.
@ -288,6 +290,11 @@ public:
inline bool allowOpenSimExportBy(const LLUUID& agent_id) const; // <FS:CR> OpenSim export permission inline bool allowOpenSimExportBy(const LLUUID& agent_id) const; // <FS:CR> OpenSim export permission
#endif #endif
// <FS:TJ> [FIRE-36028] Fix OpenSim object permissions
static bool getIsInOpenSim() { return sIsInOpenSim; }
static void setupIsInOpenSim(bool is_in_open_sim) { sIsInOpenSim = is_in_open_sim; }
// </FS:TJ>
// //
// MISC METHODS and OPERATORS // MISC METHODS and OPERATORS
// //

View File

@ -4886,6 +4886,10 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y
// <FS:TJ> [FIRE-34775] Use PST/PDT when logged into OpenSim // <FS:TJ> [FIRE-34775] Use PST/PDT when logged into OpenSim
LLStringOps::setupUsingPacificTime(!LLGridManager::getInstance()->isInSecondLife()); LLStringOps::setupUsingPacificTime(!LLGridManager::getInstance()->isInSecondLife());
// </FS:TJ> // </FS:TJ>
// <FS:TJ> [FIRE-36028] Fix OpenSim object permissions
LLPermissions::setupIsInOpenSim(!LLGridManager::getInstance()->isInSecondLife());
// </FS:TJ>
} }
// set up the voice configuration. Ultimately, we should pass this up as part of each voice // set up the voice configuration. Ultimately, we should pass this up as part of each voice