diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 28 |
4 files changed, 37 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index dd9210f..ff8589a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2503,6 +2503,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2503 | } | 2503 | } |
2504 | 2504 | ||
2505 | m_sceneGraph.LinkObjects(root, children); | 2505 | m_sceneGraph.LinkObjects(root, children); |
2506 | |||
2507 | ScenePresence sp; | ||
2508 | if (TryGetScenePresence(agentId, out sp)) | ||
2509 | { | ||
2510 | root.SendPropertiesToClient(sp.ControllingClient); | ||
2511 | } | ||
2506 | } | 2512 | } |
2507 | 2513 | ||
2508 | private string PermissionString(uint permissions) | 2514 | private string PermissionString(uint permissions) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index e29b2c1..af13b46 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1849,6 +1849,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1849 | SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; | 1849 | SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; |
1850 | } | 1850 | } |
1851 | 1851 | ||
1852 | parentGroup.AdjustChildPrimPermissions(); | ||
1852 | parentGroup.HasGroupChanged = true; | 1853 | parentGroup.HasGroupChanged = true; |
1853 | parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); | 1854 | parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); |
1854 | parentGroup.ScheduleGroupForFullUpdate(); | 1855 | parentGroup.ScheduleGroupForFullUpdate(); |
@@ -1989,6 +1990,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1989 | // return unless the root is deleted. This will remove them | 1990 | // return unless the root is deleted. This will remove them |
1990 | // from the database. They will be rewritten immediately, | 1991 | // from the database. They will be rewritten immediately, |
1991 | // minus the rows for the unlinked child prims. | 1992 | // minus the rows for the unlinked child prims. |
1993 | g.AdjustChildPrimPermissions(); | ||
1992 | m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID); | 1994 | m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID); |
1993 | g.TriggerScriptChangedEvent(Changed.LINK); | 1995 | g.TriggerScriptChangedEvent(Changed.LINK); |
1994 | g.HasGroupChanged = true; // Persist | 1996 | g.HasGroupChanged = true; // Persist |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f490d90..b12d0e0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3410,11 +3410,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3410 | 3410 | ||
3411 | public void AdjustChildPrimPermissions() | 3411 | public void AdjustChildPrimPermissions() |
3412 | { | 3412 | { |
3413 | uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits | ||
3414 | uint foldedPerms = RootPart.OwnerMask & 3; | ||
3415 | |||
3413 | ForEachPart(part => | 3416 | ForEachPart(part => |
3414 | { | 3417 | { |
3418 | newOwnerMask &= part.BaseMask; | ||
3415 | if (part != RootPart) | 3419 | if (part != RootPart) |
3416 | part.ClonePermissions(RootPart); | 3420 | part.ClonePermissions(RootPart); |
3417 | }); | 3421 | }); |
3422 | |||
3423 | RootPart.OwnerMask = newOwnerMask | foldedPerms; | ||
3424 | RootPart.ScheduleFullUpdate(); | ||
3418 | } | 3425 | } |
3419 | 3426 | ||
3420 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, | 3427 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, |
@@ -3422,8 +3429,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3422 | { | 3429 | { |
3423 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); | 3430 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); |
3424 | 3431 | ||
3432 | bool god = Scene.Permissions.IsGod(AgentID); | ||
3433 | |||
3425 | AdjustChildPrimPermissions(); | 3434 | AdjustChildPrimPermissions(); |
3426 | 3435 | ||
3436 | if (field == 1 && god) // Base mask was set. Update all child part inventories | ||
3437 | { | ||
3438 | foreach (SceneObjectPart part in Parts) | ||
3439 | part.Inventory.ApplyGodPermissions(RootPart.BaseMask); | ||
3440 | } | ||
3441 | |||
3427 | HasGroupChanged = true; | 3442 | HasGroupChanged = true; |
3428 | 3443 | ||
3429 | // Send the group's properties to all clients once all parts are updated | 3444 | // Send the group's properties to all clients once all parts are updated |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 1857757..49b771f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4468,7 +4468,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4468 | if (god) | 4468 | if (god) |
4469 | { | 4469 | { |
4470 | BaseMask = ApplyMask(BaseMask, set, mask); | 4470 | BaseMask = ApplyMask(BaseMask, set, mask); |
4471 | Inventory.ApplyGodPermissions(_baseMask); | 4471 | Inventory.ApplyGodPermissions(BaseMask); |
4472 | } | 4472 | } |
4473 | 4473 | ||
4474 | break; | 4474 | break; |
@@ -4487,7 +4487,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4487 | case 16: | 4487 | case 16: |
4488 | NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) & | 4488 | NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) & |
4489 | baseMask; | 4489 | baseMask; |
4490 | // Prevent the client from creating no mod, no copy | 4490 | // Prevent the client from creating no copy, no transfer |
4491 | // objects | 4491 | // objects |
4492 | if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0) | 4492 | if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0) |
4493 | NextOwnerMask |= (uint)PermissionMask.Transfer; | 4493 | NextOwnerMask |= (uint)PermissionMask.Transfer; |
@@ -4505,20 +4505,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
4505 | { | 4505 | { |
4506 | bool update = false; | 4506 | bool update = false; |
4507 | 4507 | ||
4508 | if (BaseMask != source.BaseMask || | 4508 | uint prevOwnerMask = OwnerMask; |
4509 | OwnerMask != source.OwnerMask || | 4509 | uint prevGroupMask = GroupMask; |
4510 | GroupMask != source.GroupMask || | 4510 | uint prevEveryoneMask = EveryoneMask; |
4511 | EveryoneMask != source.EveryoneMask || | 4511 | uint prevNextOwnerMask = NextOwnerMask; |
4512 | NextOwnerMask != source.NextOwnerMask) | ||
4513 | update = true; | ||
4514 | 4512 | ||
4515 | BaseMask = source.BaseMask; | 4513 | OwnerMask = source.OwnerMask & BaseMask; |
4516 | OwnerMask = source.OwnerMask; | 4514 | GroupMask = source.GroupMask & BaseMask; |
4517 | GroupMask = source.GroupMask; | 4515 | EveryoneMask = source.EveryoneMask & BaseMask; |
4518 | EveryoneMask = source.EveryoneMask; | 4516 | NextOwnerMask = source.NextOwnerMask & BaseMask; |
4519 | NextOwnerMask = source.NextOwnerMask; | ||
4520 | 4517 | ||
4521 | if (update) | 4518 | if (OwnerMask != prevOwnerMask || |
4519 | GroupMask != prevGroupMask || | ||
4520 | EveryoneMask != prevEveryoneMask || | ||
4521 | NextOwnerMask != prevNextOwnerMask) | ||
4522 | SendFullUpdateToAllClients(); | 4522 | SendFullUpdateToAllClients(); |
4523 | } | 4523 | } |
4524 | 4524 | ||