aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs24
1 files changed, 17 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 5b21332..b04871e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -849,8 +849,12 @@ namespace OpenSim.Region.Framework.Scenes
849 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID) 849 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
850 { 850 {
851 SceneObjectPart part = GetSceneObjectPart(localID); 851 SceneObjectPart part = GetSceneObjectPart(localID);
852 SceneObjectGroup group = part.ParentGroup; 852 SceneObjectGroup group = null;
853 if (group != null) 853 if (part != null)
854 {
855 group = part.ParentGroup;
856 }
857 if (part != null && group != null)
854 { 858 {
855 TaskInventoryItem item = group.GetInventoryItem(localID, itemID); 859 TaskInventoryItem item = group.GetInventoryItem(localID, itemID);
856 if (item == null) 860 if (item == null)
@@ -1577,9 +1581,10 @@ namespace OpenSim.Region.Framework.Scenes
1577 if (remoteClient != null) 1581 if (remoteClient != null)
1578 { 1582 {
1579 permissionToTake = 1583 permissionToTake =
1580 Permissions.CanReturnObject( 1584 Permissions.CanReturnObjects(
1581 grp.UUID, 1585 null,
1582 remoteClient.AgentId); 1586 remoteClient.AgentId,
1587 new List<SceneObjectGroup>() {grp});
1583 permissionToDelete = permissionToTake; 1588 permissionToDelete = permissionToTake;
1584 1589
1585 if (permissionToDelete) 1590 if (permissionToDelete)
@@ -1804,8 +1809,13 @@ namespace OpenSim.Region.Framework.Scenes
1804 } 1809 }
1805 else 1810 else
1806 { 1811 {
1807 item.BasePermissions = objectGroup.GetEffectivePermissions(); 1812 uint ownerPerms = objectGroup.GetEffectivePermissions();
1808 item.CurrentPermissions = objectGroup.GetEffectivePermissions(); 1813 if ((objectGroup.RootPart.OwnerMask & (uint)PermissionMask.Modify) != 0)
1814 ownerPerms |= (uint)PermissionMask.Modify;
1815
1816 item.BasePermissions = ownerPerms;
1817 item.CurrentPermissions = ownerPerms;
1818
1809 item.NextPermissions = objectGroup.RootPart.NextOwnerMask; 1819 item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
1810 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; 1820 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
1811 item.GroupPermissions = objectGroup.RootPart.GroupMask; 1821 item.GroupPermissions = objectGroup.RootPart.GroupMask;