diff options
author | UbitUmarov | 2017-04-28 20:03:44 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-28 20:03:44 +0100 |
commit | ba4e13ef55c378db13b6aa97316e99d651762a02 (patch) | |
tree | 42aa4a07f6447cb02f7205f6b3bfd86878037d75 /OpenSim/Region/CoreModules | |
parent | add a usefull taint and update (diff) | |
download | opensim-SC_OLD-ba4e13ef55c378db13b6aa97316e99d651762a02.zip opensim-SC_OLD-ba4e13ef55c378db13b6aa97316e99d651762a02.tar.gz opensim-SC_OLD-ba4e13ef55c378db13b6aa97316e99d651762a02.tar.bz2 opensim-SC_OLD-ba4e13ef55c378db13b6aa97316e99d651762a02.tar.xz |
a few changes to permissions folding... we are testing. at this point only use master for TESTING also
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 67c847b..eb7211c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -574,8 +574,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
574 | IClientAPI remoteClient) | 574 | IClientAPI remoteClient) |
575 | { | 575 | { |
576 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7; | 576 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7; |
577 | uint allObjectsNextOwnerPerms = 0x7fffffff; | 577 | |
578 | |||
579 | // For the porposes of inventory, an object is modify if the prims | 578 | // For the porposes of inventory, an object is modify if the prims |
580 | // are modify. This allows renaming an object that contains no | 579 | // are modify. This allows renaming an object that contains no |
581 | // mod items. | 580 | // mod items. |
@@ -591,21 +590,27 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
591 | 590 | ||
592 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) | 591 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) |
593 | { | 592 | { |
594 | uint perms = effectivePerms; | 593 | if ((effectivePerms & (uint)PermissionMask.FoldedCopy) == 0) |
595 | uint nextPerms = (perms & 7) << 13; | 594 | effectivePerms &= ~(uint)PermissionMask.Copy; |
596 | if ((nextPerms & (uint)PermissionMask.Copy) == 0) | 595 | if ((effectivePerms & (uint)PermissionMask.FoldedTransfer) == 0) |
597 | perms &= ~(uint)PermissionMask.Copy; | 596 | effectivePerms &= ~(uint)PermissionMask.Transfer; |
598 | if ((nextPerms & (uint)PermissionMask.Transfer) == 0) | 597 | if ((effectivePerms & (uint)PermissionMask.FoldedExport) == 0) |
599 | perms &= ~(uint)PermissionMask.Transfer; | 598 | effectivePerms &= ~(uint)PermissionMask.Export; |
600 | if ((nextPerms & (uint)PermissionMask.Modify) == 0) | ||
601 | perms &= ~(uint)PermissionMask.Modify; | ||
602 | 599 | ||
603 | // item.BasePermissions = perms & so.RootPart.NextOwnerMask; | 600 | uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; |
604 | 601 | ||
605 | uint nextp = so.RootPart.NextOwnerMask | (uint)PermissionMask.FoldedMask; | 602 | if((basePerms & (uint)PermissionMask.Copy) == 0) |
606 | item.BasePermissions = perms & nextp; | 603 | basePerms |= (uint)PermissionMask.Transfer; |
604 | |||
605 | // unlock | ||
606 | basePerms |= (uint)PermissionMask.Move; | ||
607 | |||
608 | basePerms &= ~(uint)PermissionMask.FoldedMask; | ||
609 | basePerms |= ((basePerms >> (int)PermissionMask.FoldingShift) & (uint)PermissionMask.FoldedMask); | ||
610 | |||
611 | item.BasePermissions = basePerms; | ||
607 | item.CurrentPermissions = item.BasePermissions; | 612 | item.CurrentPermissions = item.BasePermissions; |
608 | item.NextPermissions = perms & so.RootPart.NextOwnerMask; | 613 | item.NextPermissions = effectivePerms & so.RootPart.NextOwnerMask; |
609 | item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask; | 614 | item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask; |
610 | item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; | 615 | item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; |
611 | 616 | ||
@@ -626,7 +631,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
626 | (uint)PermissionMask.Modify | | 631 | (uint)PermissionMask.Modify | |
627 | (uint)PermissionMask.Move | | 632 | (uint)PermissionMask.Move | |
628 | (uint)PermissionMask.Export | | 633 | (uint)PermissionMask.Export | |
629 | 7); // Preserve folded permissions | 634 | (uint)PermissionMask.FoldedMask); // Preserve folded permissions ?? |
630 | } | 635 | } |
631 | 636 | ||
632 | return item; | 637 | return item; |