aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs29
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs7
2 files changed, 19 insertions, 17 deletions
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
1678 return false; 1678 return false;
1679 } 1679 }
1680 1680
1681
1682 private bool CanReturnObjects(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects) 1681 private bool CanReturnObjects(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects)
1683 { 1682 {
1684 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1683 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
@@ -2289,23 +2288,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions
2289 if (sog == null) 2288 if (sog == null)
2290 return false; 2289 return false;
2291 2290
2292 uint perms = GetObjectPermissions(userID, sog, true); 2291 if(sog.OwnerID == userID || IsAdministrator(userID))
2293 if((perms & (uint)PermissionMask.Modify) == 0) 2292 return true;
2294 return false; 2293
2295 2294 if(sog.IsAttachment)
2296 TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID);
2297 if(ti == null)
2298 return false; 2295 return false;
2299 2296
2300 uint itperms = GetObjectItemPermissions(userID, ti); 2297 UUID sogGroupID = sog.GroupID;
2301 2298
2302 if((itperms & (uint)PermissionMask.Copy) == 0) 2299 if(sogGroupID == UUID.Zero || sogGroupID != sog.OwnerID)
2303 return false; 2300 return false;
2304 2301
2305 if(sog.OwnerID != userID && (itperms & (uint)PermissionMask.Transfer) == 0) 2302 TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID);
2303 if(ti == null)
2306 return false; 2304 return false;
2307 2305
2308 return true; 2306 ulong powers = 0;
2307 if(GroupMemberPowers(sogGroupID, userID, ref powers))
2308 {
2309 if(powers == (ulong)GroupPowers.ObjectManipulate)
2310 return true;
2311
2312 if((ti.EveryonePermissions & (uint)PermissionMask.Copy) != 0)
2313 return true;
2314 }
2315 return false;
2309 } 2316 }
2310 2317
2311 // object inventory to object inventory item drag and drop 2318 // 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 afdd99e..ca1e0a8 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
1388 } 1388 }
1389 1389
1390 if (!Permissions.CanCopyObjectInventory(itemId, part.UUID, remoteClient.AgentId)) 1390 if (!Permissions.CanCopyObjectInventory(itemId, part.UUID, remoteClient.AgentId))
1391 { 1391 return;
1392 // check also if we can delete the no copy item
1393 if(!Permissions.CanEditObject(part.UUID, remoteClient.AgentId))
1394 return;
1395 }
1396 1392
1397 string message; 1393 string message;
1398 InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message); 1394 InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message);
@@ -1769,7 +1765,6 @@ namespace OpenSim.Region.Framework.Scenes
1769 itemInfo.CurrentPermissions &= currentItem.BasePermissions; 1765 itemInfo.CurrentPermissions &= currentItem.BasePermissions;
1770 itemInfo.NextPermissions &= currentItem.BasePermissions; 1766 itemInfo.NextPermissions &= currentItem.BasePermissions;
1771 } 1767 }
1772
1773 } 1768 }
1774 else 1769 else
1775 { 1770 {