diff options
author | Justin Clark-Casey (justincc) | 2012-02-10 02:13:15 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-10 02:13:15 +0000 |
commit | ddca5347c31aa9547395ec918b5b5dcd2e498be7 (patch) | |
tree | 947b282022c08cc368d05e5a25827a21bc2bd9bc /OpenSim/Region/Framework | |
parent | Fix another Torture test build break on Windows. (diff) | |
download | opensim-SC_OLD-ddca5347c31aa9547395ec918b5b5dcd2e498be7.zip opensim-SC_OLD-ddca5347c31aa9547395ec918b5b5dcd2e498be7.tar.gz opensim-SC_OLD-ddca5347c31aa9547395ec918b5b5dcd2e498be7.tar.bz2 opensim-SC_OLD-ddca5347c31aa9547395ec918b5b5dcd2e498be7.tar.xz |
When an asset is uploaded (e.g. a mesh) set individual copy/move/transfer permissions, not PermissionMask.All
Setting PermissionMask.All will cause next permissions to replace current permissions when the object is rezzed, since bit 4 will be set.
This is not correct behaviour for a freshly uploaded mesh. Freshly rezzed in-world prims also do not have bit 4 set (don't yet know exactly what this is).
Should resolve http://opensimulator.org/mantis/view.php?id=5651
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index af01624..5a5307c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -347,6 +347,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
347 | { | 347 | { |
348 | item.Name = itemUpd.Name; | 348 | item.Name = itemUpd.Name; |
349 | item.Description = itemUpd.Description; | 349 | item.Description = itemUpd.Description; |
350 | |||
351 | // m_log.DebugFormat( | ||
352 | // "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}", | ||
353 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, | ||
354 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); | ||
355 | |||
350 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) | 356 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) |
351 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; | 357 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; |
352 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; | 358 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; |
@@ -355,6 +361,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
355 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; | 361 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; |
356 | if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) | 362 | if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) |
357 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; | 363 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; |
364 | |||
365 | // m_log.DebugFormat("[USER INVENTORY]: item.Flags {0}", item.Flags); | ||
366 | |||
358 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; | 367 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; |
359 | item.GroupID = itemUpd.GroupID; | 368 | item.GroupID = itemUpd.GroupID; |
360 | item.GroupOwned = itemUpd.GroupOwned; | 369 | item.GroupOwned = itemUpd.GroupOwned; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index f173c95..a73d9b6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -265,6 +265,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
265 | 265 | ||
266 | public void ApplyNextOwnerPermissions() | 266 | public void ApplyNextOwnerPermissions() |
267 | { | 267 | { |
268 | // m_log.DebugFormat("[PRIM INVENTORY]: Applying next owner permissions to {0} {1}", Name, UUID); | ||
269 | |||
268 | SceneObjectPart[] parts = m_parts.GetArray(); | 270 | SceneObjectPart[] parts = m_parts.GetArray(); |
269 | for (int i = 0; i < parts.Length; i++) | 271 | for (int i = 0; i < parts.Length; i++) |
270 | parts[i].ApplyNextOwnerPermissions(); | 272 | parts[i].ApplyNextOwnerPermissions(); |