summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-12-15 00:41:40 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-12-15 00:41:40 +0200
commitdc1676af27b1a6a1d33d293b22627a6fa3749316 (patch)
tree7dbddb6a9f86ed2ccce01c33802b481c168ff264 /indra
parent3c858d7e2d6633df14df473a918d2fb848403972 (diff)
SL-20734 Uploaded Materials should use 'Uploads' permissions
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmaterialeditor.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 292ddb765f..ae61198110 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -1376,10 +1376,23 @@ bool LLMaterialEditor::saveIfNeeded()
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);
+ if (mIsOverride)
+ {
+ // Shouldn't happen, but just in case it ever changes
+ 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);
+
+ }
+ else
+ {
+ // Uploads are supposed to use Upload permissions, not material permissions
+ U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Uploads");
+ U32 group_perm = LLFloaterPerms::getGroupPerms("Uploads");
+ U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Uploads");
+ 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);