diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 17 |
1 files changed, 5 insertions, 12 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; |