From 94bb6d965e8c6e185b378546e2b84b1db8cadd80 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 3 May 2017 16:03:26 +0100 Subject: change taskInventory copy/move to agents inventory rules --- .../World/Permissions/PermissionsModule.cs | 29 ++++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 18d164f..4c4a8a5 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) - return false; - - TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID); - if(ti == null) + if(sog.OwnerID == userID || IsAdministrator(userID)) + return true; + + if(sog.IsAttachment) return false; - uint itperms = GetObjectItemPermissions(userID, ti); + UUID sogGroupID = sog.GroupID; - if((itperms & (uint)PermissionMask.Copy) == 0) + if(sogGroupID == UUID.Zero || sogGroupID != sog.OwnerID) return false; - if(sog.OwnerID != userID && (itperms & (uint)PermissionMask.Transfer) == 0) + TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID); + if(ti == null) return false; - return true; + ulong powers = 0; + if(GroupMemberPowers(sogGroupID, userID, ref powers)) + { + if(powers == (ulong)GroupPowers.ObjectManipulate) + return true; + + if((ti.EveryonePermissions & (uint)PermissionMask.Copy) != 0) + return true; + } + return false; } // object inventory to object inventory item drag and drop -- cgit v1.1