diff options
author | Dr Scofield | 2008-11-14 10:55:14 +0000 |
---|---|---|
committer | Dr Scofield | 2008-11-14 10:55:14 +0000 |
commit | 5e20e32b6993a79f8f31cb12882b9c4499140275 (patch) | |
tree | 8620c9dbaec8e4c973334511f5d3ebc98389a3d8 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |
parent | From: Alan Webb (alan_webb@us.ibm.com) (diff) | |
download | opensim-SC-5e20e32b6993a79f8f31cb12882b9c4499140275.zip opensim-SC-5e20e32b6993a79f8f31cb12882b9c4499140275.tar.gz opensim-SC-5e20e32b6993a79f8f31cb12882b9c4499140275.tar.bz2 opensim-SC-5e20e32b6993a79f8f31cb12882b9c4499140275.tar.xz |
From: Christopher Yeoh <cyeoh@au1.ibm.com>
This patch makes llAllowInventoryDrop work with the permissions module
enabled. Changes include:
- Enabled PropagatePermissions when permissions module serverside perms
is on
- change ownership of item when item is dropped into an object.
Ownership changes to the owner of the object the item is dropped into
- propagation of permissions if the permissions module enabled (eg
next-owner mask applied)
- CHANGED_ALLOWED_DROP is now passed to the change script event if an
item was allowed to be dropped into the object only because
llAllowInventoryDrop is enabled (instead of CHANGED_INVENTORY being
passed).
- Sets object flags correctly when llAllowInventoryDrop is called so
clients are notified immediately of the change in state. Am not
sure that calling aggregateScriptEvents is the right way to do it,
but it works and seems to be the only way without making further
changes to update LocalFlags
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 12095e5..590bea0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -1179,7 +1179,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1179 | destTaskItem.InvType = srcTaskItem.InvType; | 1179 | destTaskItem.InvType = srcTaskItem.InvType; |
1180 | destTaskItem.Type = srcTaskItem.Type; | 1180 | destTaskItem.Type = srcTaskItem.Type; |
1181 | 1181 | ||
1182 | destPart.AddInventoryItem(destTaskItem); | 1182 | destPart.AddInventoryItem(destTaskItem, part.OwnerID!=destPart.OwnerID |
1183 | && ExternalChecks.ExternalChecksPropagatePermissions()); | ||
1183 | 1184 | ||
1184 | if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 1185 | if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
1185 | part.RemoveInventoryItem(itemId); | 1186 | part.RemoveInventoryItem(itemId); |
@@ -1249,10 +1250,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
1249 | 1250 | ||
1250 | if (part != null) | 1251 | if (part != null) |
1251 | { | 1252 | { |
1252 | if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)) | ||
1253 | return; | ||
1254 | |||
1255 | TaskInventoryItem currentItem = part.GetInventoryItem(itemID); | 1253 | TaskInventoryItem currentItem = part.GetInventoryItem(itemID); |
1254 | bool allowInventoryDrop = (part.GetEffectiveObjectFlags() | ||
1255 | & (uint)PrimFlags.AllowInventoryDrop) != 0; | ||
1256 | // Explicity allow anyone to add to the inventory if the AllowInventoryDrop | ||
1257 | // flag has been set. Don't however let them update an item unless | ||
1258 | // they pass the external checks | ||
1259 | if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId) | ||
1260 | && (currentItem != null || !allowInventoryDrop )) | ||
1261 | return; | ||
1256 | 1262 | ||
1257 | if (currentItem == null) | 1263 | if (currentItem == null) |
1258 | { | 1264 | { |
@@ -1417,7 +1423,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1417 | taskItem.PermsMask = 0; | 1423 | taskItem.PermsMask = 0; |
1418 | taskItem.AssetID = asset.FullID; | 1424 | taskItem.AssetID = asset.FullID; |
1419 | 1425 | ||
1420 | part.AddInventoryItem(taskItem); | 1426 | part.AddInventoryItem(taskItem, false); |
1421 | part.GetProperties(remoteClient); | 1427 | part.GetProperties(remoteClient); |
1422 | 1428 | ||
1423 | part.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); | 1429 | part.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); |
@@ -1512,7 +1518,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1512 | destTaskItem.InvType = srcTaskItem.InvType; | 1518 | destTaskItem.InvType = srcTaskItem.InvType; |
1513 | destTaskItem.Type = srcTaskItem.Type; | 1519 | destTaskItem.Type = srcTaskItem.Type; |
1514 | 1520 | ||
1515 | destPart.AddInventoryItemExclusive(destTaskItem); | 1521 | destPart.AddInventoryItemExclusive(destTaskItem, false); |
1516 | 1522 | ||
1517 | if (running > 0) | 1523 | if (running > 0) |
1518 | { | 1524 | { |