aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs8
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs2
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs1
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs1
14 files changed, 58 insertions, 30 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
index 189fa36..69fcb7d 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
@@ -121,6 +121,9 @@ namespace OpenSim.Region.ClientStack.Linden
121 121
122 122
123 OSD r = OSDParser.DeserializeLLSDXml((string)request["requestbody"]); 123 OSD r = OSDParser.DeserializeLLSDXml((string)request["requestbody"]);
124 if (r.Type != OSDType.Map) // not a proper req
125 return responsedata;
126
124 //UUID session_id = UUID.Zero; 127 //UUID session_id = UUID.Zero;
125 bool bypass_raycast = false; 128 bool bypass_raycast = false;
126 uint everyone_mask = 0; 129 uint everyone_mask = 0;
@@ -157,9 +160,6 @@ namespace OpenSim.Region.ClientStack.Linden
157 int state = 0; 160 int state = 0;
158 int lastattach = 0; 161 int lastattach = 0;
159 162
160 if (r.Type != OSDType.Map) // not a proper req
161 return responsedata;
162
163 OSDMap rm = (OSDMap)r; 163 OSDMap rm = (OSDMap)r;
164 164
165 if (rm.ContainsKey("ObjectData")) //v2 165 if (rm.ContainsKey("ObjectData")) //v2
@@ -307,8 +307,6 @@ namespace OpenSim.Region.ClientStack.Linden
307 } 307 }
308 } 308 }
309 309
310
311
312 Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); 310 Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false);
313 311
314 PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); 312 PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox();
@@ -359,6 +357,8 @@ namespace OpenSim.Region.ClientStack.Linden
359 rootpart.NextOwnerMask = next_owner_mask; 357 rootpart.NextOwnerMask = next_owner_mask;
360 rootpart.Material = (byte)material; 358 rootpart.Material = (byte)material;
361 359
360 obj.AggregatePerms();
361
362 m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); 362 m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
363 363
364 responsedata["int_response_code"] = 200; //501; //410; //404; 364 responsedata["int_response_code"] = 200; //501; //410; //404;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 6874662..116c51f 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -335,6 +335,7 @@ namespace OpenSim.Region.ClientStack.Linden
335 grp.AbsolutePosition = obj.Position; 335 grp.AbsolutePosition = obj.Position;
336 prim.RotationOffset = obj.Rotation; 336 prim.RotationOffset = obj.Rotation;
337 337
338
338 // Required for linking 339 // Required for linking
339 grp.RootPart.ClearUpdateSchedule(); 340 grp.RootPart.ClearUpdateSchedule();
340 341
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index c913271..473589a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -338,6 +338,7 @@ namespace OpenSim.Region.Framework.Scenes
338 // Update item with new asset 338 // Update item with new asset
339 item.AssetID = asset.FullID; 339 item.AssetID = asset.FullID;
340 group.UpdateInventoryItem(item); 340 group.UpdateInventoryItem(item);
341 group.AggregatePerms();
341 342
342 part.SendPropertiesToClient(remoteClient); 343 part.SendPropertiesToClient(remoteClient);
343 344
@@ -1214,6 +1215,7 @@ namespace OpenSim.Region.Framework.Scenes
1214 } 1215 }
1215 1216
1216 group.RemoveInventoryItem(localID, itemID); 1217 group.RemoveInventoryItem(localID, itemID);
1218 group.AggregatePerms();
1217 } 1219 }
1218 1220
1219 part.SendPropertiesToClient(remoteClient); 1221 part.SendPropertiesToClient(remoteClient);
@@ -1530,9 +1532,10 @@ namespace OpenSim.Region.Framework.Scenes
1530 destTaskItem.Type = srcTaskItem.Type; 1532 destTaskItem.Type = srcTaskItem.Type;
1531 1533
1532 destPart.Inventory.AddInventoryItem(destTaskItem, part.OwnerID != destPart.OwnerID); 1534 destPart.Inventory.AddInventoryItem(destTaskItem, part.OwnerID != destPart.OwnerID);
1533
1534 if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 1535 if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
1536 {
1535 part.Inventory.RemoveInventoryItem(itemId); 1537 part.Inventory.RemoveInventoryItem(itemId);
1538 }
1536 1539
1537 ScenePresence avatar; 1540 ScenePresence avatar;
1538 1541
@@ -1978,6 +1981,8 @@ namespace OpenSim.Region.Framework.Scenes
1978 part.Inventory.AddInventoryItem(taskItem, false); 1981 part.Inventory.AddInventoryItem(taskItem, false);
1979 part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); 1982 part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0);
1980 1983
1984 part.ParentGroup.AggregatePerms();
1985
1981 // tell anyone managing scripts that a new script exists 1986 // tell anyone managing scripts that a new script exists
1982 EventManager.TriggerNewScript(agentID, part, taskItem.ItemID); 1987 EventManager.TriggerNewScript(agentID, part, taskItem.ItemID);
1983 1988
@@ -2658,6 +2663,7 @@ namespace OpenSim.Region.Framework.Scenes
2658 2663
2659 // We can only call this after adding the scene object, since the scene object references the scene 2664 // We can only call this after adding the scene object, since the scene object references the scene
2660 // to find out if scripts should be activated at all. 2665 // to find out if scripts should be activated at all.
2666 group.AggregatePerms();
2661 group.CreateScriptInstances(param, true, DefaultScriptEngine, 3); 2667 group.CreateScriptInstances(param, true, DefaultScriptEngine, 3);
2662 2668
2663 group.ScheduleGroupForFullUpdate(); 2669 group.ScheduleGroupForFullUpdate();
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2137b42..ff1e34e 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2351,6 +2351,7 @@ namespace OpenSim.Region.Framework.Scenes
2351 EventManager.TriggerOnSceneObjectLoaded(group); 2351 EventManager.TriggerOnSceneObjectLoaded(group);
2352 SceneObjectPart rootPart = group.GetPart(group.UUID); 2352 SceneObjectPart rootPart = group.GetPart(group.UUID);
2353 rootPart.Flags &= ~PrimFlags.Scripted; 2353 rootPart.Flags &= ~PrimFlags.Scripted;
2354 group.AggregateDeepPerms();
2354 rootPart.TrimPermissions(); 2355 rootPart.TrimPermissions();
2355 2356
2356 // Don't do this here - it will get done later on when sculpt data is loaded. 2357 // Don't do this here - it will get done later on when sculpt data is loaded.
@@ -2622,6 +2623,7 @@ namespace OpenSim.Region.Framework.Scenes
2622 if (UserManagementModule != null) 2623 if (UserManagementModule != null)
2623 sceneObject.RootPart.CreatorIdentification = UserManagementModule.GetUserUUI(ownerID); 2624 sceneObject.RootPart.CreatorIdentification = UserManagementModule.GetUserUUI(ownerID);
2624 2625
2626 sceneObject.AggregateDeepPerms();
2625 sceneObject.ScheduleGroupForFullUpdate(); 2627 sceneObject.ScheduleGroupForFullUpdate();
2626 2628
2627 return sceneObject; 2629 return sceneObject;
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index dad8cac..7a97bfc 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -343,7 +343,7 @@ namespace OpenSim.Region.Framework.Scenes
343 sceneObject.ForceInventoryPersistence(); 343 sceneObject.ForceInventoryPersistence();
344 sceneObject.HasGroupChanged = true; 344 sceneObject.HasGroupChanged = true;
345 } 345 }
346 346 sceneObject.AggregateDeepPerms();
347 return ret; 347 return ret;
348 } 348 }
349 349
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 399e341..5ecf352 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Framework.Scenes
171 bool addFromAllowedDrop = agentID != part.OwnerID; 171 bool addFromAllowedDrop = agentID != part.OwnerID;
172 172
173 part.Inventory.AddInventoryItem(taskItem, addFromAllowedDrop); 173 part.Inventory.AddInventoryItem(taskItem, addFromAllowedDrop);
174 174 part.ParentGroup.AggregatePerms();
175 return true; 175 return true;
176 } 176 }
177 else 177 else
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes
259 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) 259 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc)
260 // bc this is on heavy duty code paths 260 // bc this is on heavy duty code paths
261 // but for now we need to test the concept 261 // but for now we need to test the concept
262 AggregateDeepPerms(); 262// AggregateDeepPerms();
263 return m_EffectiveEveryOnePerms; 263 return m_EffectiveEveryOnePerms;
264 } 264 }
265 } 265 }
@@ -272,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes
272 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) 272 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc)
273 // bc this is on heavy duty code paths 273 // bc this is on heavy duty code paths
274 // but for now we need to test the concept 274 // but for now we need to test the concept
275 AggregateDeepPerms(); 275// AggregateDeepPerms();
276 return m_EffectiveGroupPerms; 276 return m_EffectiveGroupPerms;
277 } 277 }
278 } 278 }
@@ -285,7 +285,7 @@ namespace OpenSim.Region.Framework.Scenes
285 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) 285 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc)
286 // bc this is on heavy duty code paths 286 // bc this is on heavy duty code paths
287 // but for now we need to test the concept 287 // but for now we need to test the concept
288 AggregateDeepPerms(); 288// AggregateDeepPerms();
289 return m_EffectiveGroupOrEveryOnePerms; 289 return m_EffectiveGroupOrEveryOnePerms;
290 } 290 }
291 } 291 }
@@ -298,7 +298,7 @@ namespace OpenSim.Region.Framework.Scenes
298 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) 298 // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc)
299 // bc this is on heavy duty code paths 299 // bc this is on heavy duty code paths
300 // but for now we need to test the concept 300 // but for now we need to test the concept
301 AggregateDeepPerms(); 301 // AggregateDeepPerms();
302 return m_EffectiveOwnerPerms; 302 return m_EffectiveOwnerPerms;
303 } 303 }
304 } 304 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 033170d..d14c450 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2441,17 +2441,16 @@ namespace OpenSim.Region.Framework.Scenes
2441 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 2441 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
2442 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; 2442 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
2443 2443
2444
2445 if (userExposed) 2444 if (userExposed)
2446 dupe.m_rootPart.TrimPermissions(); 2445 dupe.m_rootPart.TrimPermissions();
2447 2446
2448 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.GetArray()); 2447 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.GetArray());
2449 2448
2450 partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2) 2449 partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2)
2451 { 2450 {
2452 return p1.LinkNum.CompareTo(p2.LinkNum); 2451 return p1.LinkNum.CompareTo(p2.LinkNum);
2453 } 2452 }
2454 ); 2453 );
2455 2454
2456 foreach (SceneObjectPart part in partList) 2455 foreach (SceneObjectPart part in partList)
2457 { 2456 {
@@ -2503,10 +2502,12 @@ namespace OpenSim.Region.Framework.Scenes
2503 if (dupe.m_rootPart.PhysActor != null) 2502 if (dupe.m_rootPart.PhysActor != null)
2504 dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building 2503 dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building
2505 2504
2505 dupe.AggregateDeepPerms();
2506
2506 dupe.HasGroupChanged = true; 2507 dupe.HasGroupChanged = true;
2507 dupe.AttachToBackup(); 2508 dupe.AttachToBackup();
2508 2509
2509 ScheduleGroupForFullUpdate(); 2510 dupe.ScheduleGroupForFullUpdate();
2510 } 2511 }
2511 2512
2512 m_dupeInProgress = false; 2513 m_dupeInProgress = false;
@@ -3426,6 +3427,7 @@ namespace OpenSim.Region.Framework.Scenes
3426 objectGroup.HasGroupChangedDueToDelink = true; 3427 objectGroup.HasGroupChangedDueToDelink = true;
3427 3428
3428 InvalidBoundsRadius(); 3429 InvalidBoundsRadius();
3430 objectGroup.AggregatePerms();
3429 3431
3430 if (sendEvents) 3432 if (sendEvents)
3431 linkPart.TriggerScriptChangedEvent(Changed.LINK); 3433 linkPart.TriggerScriptChangedEvent(Changed.LINK);
@@ -3964,8 +3966,8 @@ namespace OpenSim.Region.Framework.Scenes
3964 3966
3965 public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive) 3967 public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive)
3966 { 3968 {
3967 uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff8; // Mask folded bits 3969 uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits
3968 uint foldedPerms = RootPart.OwnerMask & 3; 3970 uint foldedPerms = RootPart.OwnerMask & (uint)PermissionMask.FoldedMask;
3969 3971
3970 ForEachPart(part => 3972 ForEachPart(part =>
3971 { 3973 {
@@ -3976,14 +3978,14 @@ namespace OpenSim.Region.Framework.Scenes
3976 part.Inventory.ApplyGodPermissions(part.BaseMask); 3978 part.Inventory.ApplyGodPermissions(part.BaseMask);
3977 }); 3979 });
3978 3980
3979 uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify); 3981 uint lockMask = ~(uint)(PermissionMask.Move);
3980 uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move | PermissionMask.Modify); 3982 uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move);
3981 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); 3983 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask);
3982 3984
3983// m_log.DebugFormat( 3985// m_log.DebugFormat(
3984// "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", 3986// "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}",
3985// (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); 3987// (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name);
3986 3988 AggregatePerms();
3987 RootPart.ScheduleFullUpdate(); 3989 RootPart.ScheduleFullUpdate();
3988 } 3990 }
3989 3991
@@ -4008,6 +4010,7 @@ namespace OpenSim.Region.Framework.Scenes
4008 { 4010 {
4009 foreach (SceneObjectPart part in Parts) 4011 foreach (SceneObjectPart part in Parts)
4010 part.Inventory.ApplyGodPermissions(RootPart.BaseMask); 4012 part.Inventory.ApplyGodPermissions(RootPart.BaseMask);
4013 AggregatePerms();
4011 } 4014 }
4012 4015
4013 HasGroupChanged = true; 4016 HasGroupChanged = true;
@@ -5223,6 +5226,7 @@ namespace OpenSim.Region.Framework.Scenes
5223 { 5226 {
5224 part.ResetOwnerChangeFlag(); 5227 part.ResetOwnerChangeFlag();
5225 }); 5228 });
5229 AggregatePerms();
5226 } 5230 }
5227 5231
5228 // clear some references to easy cg 5232 // clear some references to easy cg
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 0817144..69d8288 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -476,8 +476,8 @@ namespace OpenSim.Region.Framework.Scenes
476 APIDActive = false; 476 APIDActive = false;
477 Flags = 0; 477 Flags = 0;
478 CreateSelected = true; 478 CreateSelected = true;
479
480 TrimPermissions(); 479 TrimPermissions();
480 AggregateInnerPerms();
481 } 481 }
482 482
483 #endregion Constructors 483 #endregion Constructors
@@ -4495,7 +4495,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4495 4495
4496 break; 4496 break;
4497 } 4497 }
4498 4498 AggregateInnerPerms();
4499 SendFullUpdateToAllClients(); 4499 SendFullUpdateToAllClients();
4500 } 4500 }
4501 } 4501 }
@@ -4512,6 +4512,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4512 EveryoneMask = source.EveryoneMask & BaseMask; 4512 EveryoneMask = source.EveryoneMask & BaseMask;
4513 NextOwnerMask = source.NextOwnerMask & BaseMask; 4513 NextOwnerMask = source.NextOwnerMask & BaseMask;
4514 4514
4515 AggregateInnerPerms();
4516
4515 if (OwnerMask != prevOwnerMask || 4517 if (OwnerMask != prevOwnerMask ||
4516 GroupMask != prevGroupMask || 4518 GroupMask != prevGroupMask ||
4517 EveryoneMask != prevEveryoneMask || 4519 EveryoneMask != prevEveryoneMask ||
@@ -5335,6 +5337,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5335 item.OwnerChanged = false; 5337 item.OwnerChanged = false;
5336 Inventory.UpdateInventoryItem(item, false, false); 5338 Inventory.UpdateInventoryItem(item, false, false);
5337 } 5339 }
5340 AggregateInnerPerms();
5338 } 5341 }
5339 5342
5340 /// <summary> 5343 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 29d9f08..545d44b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -807,6 +807,7 @@ namespace OpenSim.Region.Framework.Scenes
807 else 807 else
808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
809 809
810 m_part.AggregateInnerPerms();
810 m_inventorySerial++; 811 m_inventorySerial++;
811 //m_inventorySerial += 2; 812 //m_inventorySerial += 2;
812 HasInventoryChanged = true; 813 HasInventoryChanged = true;
@@ -829,7 +830,7 @@ namespace OpenSim.Region.Framework.Scenes
829// m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 830// m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
830 } 831 }
831 m_items.LockItemsForWrite(false); 832 m_items.LockItemsForWrite(false);
832 833 m_part.AggregateInnerPerms();
833 m_inventorySerial++; 834 m_inventorySerial++;
834 } 835 }
835 836
@@ -1022,16 +1023,20 @@ namespace OpenSim.Region.Framework.Scenes
1022 item.AssetID = m_items[item.ItemID].AssetID; 1023 item.AssetID = m_items[item.ItemID].AssetID;
1023 1024
1024 m_items[item.ItemID] = item; 1025 m_items[item.ItemID] = item;
1026
1025 m_inventorySerial++; 1027 m_inventorySerial++;
1026 if (fireScriptEvents) 1028 if (fireScriptEvents)
1027 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 1029 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
1028 1030
1029 if (considerChanged) 1031 if (considerChanged)
1030 { 1032 {
1033 m_part.AggregateInnerPerms();
1034 m_part.ParentGroup.AggregatePerms();
1031 HasInventoryChanged = true; 1035 HasInventoryChanged = true;
1032 m_part.ParentGroup.HasGroupChanged = true; 1036 m_part.ParentGroup.HasGroupChanged = true;
1033 } 1037 }
1034 m_items.LockItemsForWrite(false); 1038 m_items.LockItemsForWrite(false);
1039
1035 return true; 1040 return true;
1036 } 1041 }
1037 else 1042 else
@@ -1068,6 +1073,10 @@ namespace OpenSim.Region.Framework.Scenes
1068 m_items.LockItemsForWrite(true); 1073 m_items.LockItemsForWrite(true);
1069 m_items.Remove(itemID); 1074 m_items.Remove(itemID);
1070 m_items.LockItemsForWrite(false); 1075 m_items.LockItemsForWrite(false);
1076
1077 m_part.AggregateInnerPerms();
1078 m_part.ParentGroup.AggregatePerms();
1079
1071 m_inventorySerial++; 1080 m_inventorySerial++;
1072 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 1081 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
1073 1082
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index b8d210c..a12a401 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -114,7 +114,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
114 // Script state may, or may not, exist. Not having any, is NOT 114 // Script state may, or may not, exist. Not having any, is NOT
115 // ever a problem. 115 // ever a problem.
116 sceneObject.LoadScriptState(reader); 116 sceneObject.LoadScriptState(reader);
117 117 sceneObject.AggregateDeepPerms();
118 return sceneObject; 118 return sceneObject;
119 } 119 }
120 120
@@ -278,7 +278,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
278 // Script state may, or may not, exist. Not having any, is NOT 278 // Script state may, or may not, exist. Not having any, is NOT
279 // ever a problem. 279 // ever a problem.
280 sceneObject.LoadScriptState(doc); 280 sceneObject.LoadScriptState(doc);
281 281 sceneObject.AggregatePerms();
282 return sceneObject; 282 return sceneObject;
283 } 283 }
284 catch (Exception e) 284 catch (Exception e)
@@ -1739,6 +1739,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1739 1739
1740 reader.ReadEndElement(); // SceneObjectPart 1740 reader.ReadEndElement(); // SceneObjectPart
1741 1741
1742 obj.AggregateInnerPerms();
1742 // m_log.DebugFormat("[SceneObjectSerializer]: parsed SOP {0} {1}", obj.Name, obj.UUID); 1743 // m_log.DebugFormat("[SceneObjectSerializer]: parsed SOP {0} {1}", obj.Name, obj.UUID);
1743 return obj; 1744 return obj;
1744 } 1745 }
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs
index 01bc491..0f022dd 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs
@@ -70,6 +70,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
70 //obj.RegenerateFullIDs(); 70 //obj.RegenerateFullIDs();
71 71
72 scene.AddNewSceneObject(obj, true); 72 scene.AddNewSceneObject(obj, true);
73 obj.AggregateDeepPerms();
73 } 74 }
74 } 75 }
75 else 76 else
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
index a9fdb66..6cf0092 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
@@ -665,7 +665,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
665 taskItem.AssetID = asset.FullID; 665 taskItem.AssetID = asset.FullID;
666 666
667 host.Inventory.AddInventoryItem(taskItem, false); 667 host.Inventory.AddInventoryItem(taskItem, false);
668 668 host.ParentGroup.AggregatePerms();
669 m_comms.DispatchReply(scriptID,1,assetID.ToString(),reqID.ToString()); 669 m_comms.DispatchReply(scriptID,1,assetID.ToString(),reqID.ToString());
670 } 670 }
671 671
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index e22c6ea..bf74849 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -525,7 +525,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
525 525
526 m_scene.AddNewSceneObject(sceneObject, true); 526 m_scene.AddNewSceneObject(sceneObject, true);
527 sceneObject.SetGroup(groupID, null); 527 sceneObject.SetGroup(groupID, null);
528 528 sceneObject.AggregatePerms();
529 return sceneObject; 529 return sceneObject;
530 } 530 }
531 531
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index e769c6d..a17eb03 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2038,6 +2038,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2038 m_host.Inventory.AddInventoryItemExclusive(taskItem, false); 2038 m_host.Inventory.AddInventoryItemExclusive(taskItem, false);
2039 else 2039 else
2040 m_host.Inventory.AddInventoryItem(taskItem, false); 2040 m_host.Inventory.AddInventoryItem(taskItem, false);
2041 m_host.ParentGroup.AggregatePerms();
2041 2042
2042 return taskItem; 2043 return taskItem;
2043 } 2044 }