diff options
Diffstat (limited to '')
3 files changed, 13 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 916ddb0..f1885da 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -579,26 +579,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
579 | IClientAPI remoteClient) | 579 | IClientAPI remoteClient) |
580 | { | 580 | { |
581 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export | PermissionMask.FoldedMask); | 581 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export | PermissionMask.FoldedMask); |
582 | 582 | ||
583 | // For the porposes of inventory, an object is modify if the prims | ||
584 | // are modify. This allows renaming an object that contains no | ||
585 | // mod items. | ||
586 | foreach (SceneObjectGroup grp in objsForEffectivePermissions) | 583 | foreach (SceneObjectGroup grp in objsForEffectivePermissions) |
587 | { | 584 | { |
588 | uint groupPerms = grp.GetEffectivePermissions(true); | 585 | effectivePerms &= grp.CurrentAndFoldedNextPermissions(); |
589 | // if ((grp.RootPart.BaseMask & (uint)PermissionMask.Modify) != 0) | ||
590 | // groupPerms |= (uint)PermissionMask.Modify; | ||
591 | |||
592 | effectivePerms &= groupPerms; | ||
593 | } | 586 | } |
594 | 587 | ||
595 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) | 588 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) |
596 | { | 589 | { |
590 | // apply parts inventory items next owner | ||
597 | PermissionsUtil.ApplyNoModFoldedPermissions(effectivePerms, ref effectivePerms); | 591 | PermissionsUtil.ApplyNoModFoldedPermissions(effectivePerms, ref effectivePerms); |
598 | 592 | // change to next owner | |
599 | uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; | 593 | uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; |
600 | 594 | // fix and update folded | |
601 | // rebuild folded perms since we don't have then on inworld objects | ||
602 | basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms); | 595 | basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms); |
603 | 596 | ||
604 | item.BasePermissions = basePerms; | 597 | item.BasePermissions = basePerms; |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 6854b53..d1a109e 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -206,12 +206,12 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
206 | item.InvType = (int)InventoryType.Object; | 206 | item.InvType = (int)InventoryType.Object; |
207 | item.Folder = categoryID; | 207 | item.Folder = categoryID; |
208 | 208 | ||
209 | perms = group.GetEffectivePermissions(false); | 209 | perms = group.CurrentAndFoldedNextPermissions(); |
210 | 210 | // apply parts inventory next perms | |
211 | PermissionsUtil.ApplyNoModFoldedPermissions(perms, ref perms); | 211 | PermissionsUtil.ApplyNoModFoldedPermissions(perms, ref perms); |
212 | 212 | // change to next owner perms | |
213 | perms &= part.NextOwnerMask; | 213 | perms &= part.NextOwnerMask; |
214 | 214 | // update folded | |
215 | perms = PermissionsUtil.FixAndFoldPermissions(perms); | 215 | perms = PermissionsUtil.FixAndFoldPermissions(perms); |
216 | 216 | ||
217 | item.BasePermissions = perms; | 217 | item.BasePermissions = perms; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 66c9013..36844a9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -484,7 +484,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
484 | } | 484 | } |
485 | } | 485 | } |
486 | 486 | ||
487 | public uint GetEffectivePermissions(bool useBase) | 487 | public uint CurrentAndFoldedNextPermissions() |
488 | { | 488 | { |
489 | uint perms=(uint)(PermissionMask.Modify | | 489 | uint perms=(uint)(PermissionMask.Modify | |
490 | PermissionMask.Copy | | 490 | PermissionMask.Copy | |
@@ -492,18 +492,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
492 | PermissionMask.Transfer | | 492 | PermissionMask.Transfer | |
493 | PermissionMask.FoldedMask); | 493 | PermissionMask.FoldedMask); |
494 | 494 | ||
495 | uint ownerMask = 0x7fffffff; | 495 | uint ownerMask = RootPart.OwnerMask; |
496 | 496 | ||
497 | SceneObjectPart[] parts = m_parts.GetArray(); | 497 | SceneObjectPart[] parts = m_parts.GetArray(); |
498 | for (int i = 0; i < parts.Length; i++) | 498 | for (int i = 0; i < parts.Length; i++) |
499 | { | 499 | { |
500 | SceneObjectPart part = parts[i]; | 500 | SceneObjectPart part = parts[i]; |
501 | 501 | ownerMask &= part.BaseMask; | |
502 | if (useBase) | ||
503 | ownerMask &= part.BaseMask; | ||
504 | else | ||
505 | ownerMask &= part.OwnerMask; | ||
506 | |||
507 | perms &= part.Inventory.MaskEffectivePermissions(); | 502 | perms &= part.Inventory.MaskEffectivePermissions(); |
508 | } | 503 | } |
509 | 504 | ||