diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 257e01e..400a415 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -922,7 +922,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
922 | rootPart.Name = item.Name; | 922 | rootPart.Name = item.Name; |
923 | rootPart.Description = item.Description; | 923 | rootPart.Description = item.Description; |
924 | } | 924 | } |
925 | 925 | /* reverted to old code till part.ApplyPermissionsOnRez is better reviewed/fixed | |
926 | group.SetGroup(m_part.GroupID, null); | 926 | group.SetGroup(m_part.GroupID, null); |
927 | 927 | ||
928 | foreach (SceneObjectPart part in group.Parts) | 928 | foreach (SceneObjectPart part in group.Parts) |
@@ -938,7 +938,49 @@ namespace OpenSim.Region.Framework.Scenes | |||
938 | 938 | ||
939 | part.ApplyPermissionsOnRez(dest, false, m_part.ParentGroup.Scene); | 939 | part.ApplyPermissionsOnRez(dest, false, m_part.ParentGroup.Scene); |
940 | } | 940 | } |
941 | */ | ||
942 | // old code start | ||
943 | SceneObjectPart[] partList = group.Parts; | ||
944 | |||
945 | group.SetGroup(m_part.GroupID, null); | ||
946 | |||
947 | // TODO: Remove magic number badness | ||
948 | if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | ||
949 | { | ||
950 | if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) | ||
951 | { | ||
952 | foreach (SceneObjectPart part in partList) | ||
953 | { | ||
954 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) | ||
955 | part.EveryoneMask = item.EveryonePermissions; | ||
956 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) | ||
957 | part.NextOwnerMask = item.NextPermissions; | ||
958 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
959 | part.GroupMask = item.GroupPermissions; | ||
960 | } | ||
941 | 961 | ||
962 | group.ApplyNextOwnerPermissions(); | ||
963 | } | ||
964 | } | ||
965 | |||
966 | foreach (SceneObjectPart part in partList) | ||
967 | { | ||
968 | // TODO: Remove magic number badness | ||
969 | if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | ||
970 | { | ||
971 | part.LastOwnerID = part.OwnerID; | ||
972 | part.OwnerID = item.OwnerID; | ||
973 | part.Inventory.ChangeInventoryOwner(item.OwnerID); | ||
974 | } | ||
975 | |||
976 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) | ||
977 | part.EveryoneMask = item.EveryonePermissions; | ||
978 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) | ||
979 | part.NextOwnerMask = item.NextPermissions; | ||
980 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
981 | part.GroupMask = item.GroupPermissions; | ||
982 | } | ||
983 | // old code end | ||
942 | rootPart.TrimPermissions(); | 984 | rootPart.TrimPermissions(); |
943 | } | 985 | } |
944 | 986 | ||