summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-07-02 17:21:09 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-07-02 17:21:09 +0300
commitccf51f173ca80215e5ecb02cdb04724374349de9 (patch)
tree90d2a387eb8725d2c8fa6c60e26b82a157df6a0c /indra/newview
parent46b037aabd90bd673061d7dc7576b71eb91a3b9b (diff)
SL-12334 Texture UUID is not copied to clipboard from a full-perms object
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelface.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 4249a13827..091ea3764d 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -2872,6 +2872,20 @@ void LLPanelFace::onCopyTexture()
bool from_library = get_is_predefined_texture(id);
bool full_perm = from_library;
+ if (!full_perm
+ && objectp->permCopy()
+ && objectp->permTransfer()
+ && objectp->permModify())
+ {
+ // If agent created this object and nothing is limiting permissions, mark as full perm
+ // If agent was granted permission to edit objects owned and created by somebody else, mark full perm
+ // This check is not perfect since we can't figure out whom textures belong to so this ended up restrictive
+ std::string creator_app_link;
+ LLUUID creator_id;
+ LLSelectMgr::getInstance()->selectGetCreator(creator_id, creator_app_link);
+ full_perm = objectp->mOwnerID == creator_id;
+ }
+
if (id.notNull() && !full_perm)
{
std::map<LLUUID, LLUUID>::iterator iter = asset_item_map.find(id);
@@ -3056,7 +3070,7 @@ void LLPanelFace::onPasteTexture()
return;
}
- bool full_perm = true;
+ bool full_perm_object = true;
LLSD::array_const_iterator iter = clipboard.beginArray();
LLSD::array_const_iterator end = clipboard.endArray();
for (; iter != end; ++iter)
@@ -3064,8 +3078,9 @@ void LLPanelFace::onPasteTexture()
const LLSD& te_data = *iter;
if (te_data.has("te"))
{
- full_perm &= te_data["te"].has("itemfullperm") && te_data["te"]["itemfullperm"].asBoolean();
- if (te_data["te"].has("imageitemid"))
+ bool full_perm = te_data["te"].has("itemfullperm") && te_data["te"]["itemfullperm"].asBoolean();
+ full_perm_object &= full_perm;
+ if (!full_perm && te_data["te"].has("imageitemid"))
{
LLUUID item_id = te_data["te"]["imageitemid"].asUUID();
if (item_id.notNull())
@@ -3085,7 +3100,7 @@ void LLPanelFace::onPasteTexture()
}
}
- if (!full_perm)
+ if (!full_perm_object)
{
LLNotificationsUtil::add("FacePasteTexturePermissions");
}