diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-09-04 17:08:43 +0300 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-09-05 19:50:26 +0300 |
commit | acc7f6a271ce7695fd681ae67dd4071ad5246f10 (patch) | |
tree | dd33d86c680bb6e63770c7b6400caea10b138ecb /indra | |
parent | 8d0af77d0b931781fd44e83e672f40fdb1ee458e (diff) |
SL-18125 Fixed default upload permissions being ignored
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 54d85c87ac..daf6fdb20d 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1197,10 +1197,16 @@ bool LLMaterialEditor::saveIfNeeded() } else { - //make a new inventory item - std::string res_desc = buildMaterialDescription(); + // Make a new inventory item and set upload permissions LLPermissions local_permissions; local_permissions.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); + + U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials"); + U32 group_perm = LLFloaterPerms::getGroupPerms("Materials"); + U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials"); + local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm); + + std::string res_desc = buildMaterialDescription(); createInventoryItem(buffer, mMaterialName, res_desc, local_permissions); // We do not update floater with uploaded asset yet, so just close it. |