diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 18d164f1e1..4c4a8a53d5 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -1678,7 +1678,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions return false; } - private bool CanReturnObjects(ILandObject land, ScenePresence sp, List objects) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); @@ -2289,23 +2288,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (sog == null) return false; - uint perms = GetObjectPermissions(userID, sog, true); - if((perms & (uint)PermissionMask.Modify) == 0) + if(sog.OwnerID == userID || IsAdministrator(userID)) + return true; + + if(sog.IsAttachment) + return false; + + UUID sogGroupID = sog.GroupID; + + if(sogGroupID == UUID.Zero || sogGroupID != sog.OwnerID) return false; TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID); if(ti == null) return false; - uint itperms = GetObjectItemPermissions(userID, ti); + ulong powers = 0; + if(GroupMemberPowers(sogGroupID, userID, ref powers)) + { + if(powers == (ulong)GroupPowers.ObjectManipulate) + return true; - if((itperms & (uint)PermissionMask.Copy) == 0) - return false; - - if(sog.OwnerID != userID && (itperms & (uint)PermissionMask.Transfer) == 0) - return false; - - return true; + if((ti.EveryonePermissions & (uint)PermissionMask.Copy) != 0) + return true; + } + return false; } // object inventory to object inventory item drag and drop diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index afdd99ea44..ca1e0a81d1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1388,11 +1388,7 @@ namespace OpenSim.Region.Framework.Scenes } if (!Permissions.CanCopyObjectInventory(itemId, part.UUID, remoteClient.AgentId)) - { - // check also if we can delete the no copy item - if(!Permissions.CanEditObject(part.UUID, remoteClient.AgentId)) - return; - } + return; string message; InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message); @@ -1769,7 +1765,6 @@ namespace OpenSim.Region.Framework.Scenes itemInfo.CurrentPermissions &= currentItem.BasePermissions; itemInfo.NextPermissions &= currentItem.BasePermissions; } - } else {