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.cs34
1 files changed, 23 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index afdd99e..bba7a96 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Framework.Scenes
338 // Update item with new asset 338 // Update item with new asset
339 item.AssetID = asset.FullID; 339 item.AssetID = asset.FullID;
340 group.UpdateInventoryItem(item); 340 group.UpdateInventoryItem(item);
341 group.AggregatePerms(); 341 group.InvalidateEffectivePerms();
342 342
343 part.SendPropertiesToClient(remoteClient); 343 part.SendPropertiesToClient(remoteClient);
344 344
@@ -1216,7 +1216,7 @@ namespace OpenSim.Region.Framework.Scenes
1216 } 1216 }
1217 1217
1218 group.RemoveInventoryItem(localID, itemID); 1218 group.RemoveInventoryItem(localID, itemID);
1219 group.AggregatePerms(); 1219 group.InvalidateEffectivePerms();
1220 } 1220 }
1221 1221
1222 part.SendPropertiesToClient(remoteClient); 1222 part.SendPropertiesToClient(remoteClient);
@@ -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);
@@ -1742,8 +1738,25 @@ namespace OpenSim.Region.Framework.Scenes
1742 // Check if we're allowed to mess with permissions 1738 // Check if we're allowed to mess with permissions
1743 if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god 1739 if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god
1744 { 1740 {
1741 bool noChange;
1745 if (remoteClient.AgentId != part.OwnerID) // Not owner 1742 if (remoteClient.AgentId != part.OwnerID) // Not owner
1746 { 1743 {
1744 noChange = true;
1745 if(itemInfo.OwnerID == UUID.Zero && itemInfo.GroupID != UUID.Zero)
1746 {
1747 if(remoteClient.IsGroupMember(itemInfo.GroupID))
1748 {
1749 ulong powers = remoteClient.GetGroupPowers(itemInfo.GroupID);
1750 if((powers & (ulong)GroupPowers.ObjectManipulate) != 0)
1751 noChange = false;
1752 }
1753 }
1754 }
1755 else
1756 noChange = false;
1757
1758 if(noChange)
1759 {
1747 // Friends and group members can't change any perms 1760 // Friends and group members can't change any perms
1748 itemInfo.BasePermissions = currentItem.BasePermissions; 1761 itemInfo.BasePermissions = currentItem.BasePermissions;
1749 itemInfo.EveryonePermissions = currentItem.EveryonePermissions; 1762 itemInfo.EveryonePermissions = currentItem.EveryonePermissions;
@@ -1769,7 +1782,6 @@ namespace OpenSim.Region.Framework.Scenes
1769 itemInfo.CurrentPermissions &= currentItem.BasePermissions; 1782 itemInfo.CurrentPermissions &= currentItem.BasePermissions;
1770 itemInfo.NextPermissions &= currentItem.BasePermissions; 1783 itemInfo.NextPermissions &= currentItem.BasePermissions;
1771 } 1784 }
1772
1773 } 1785 }
1774 else 1786 else
1775 { 1787 {
@@ -1955,7 +1967,7 @@ namespace OpenSim.Region.Framework.Scenes
1955 part.Inventory.AddInventoryItem(taskItem, false); 1967 part.Inventory.AddInventoryItem(taskItem, false);
1956 part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); 1968 part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0);
1957 1969
1958 part.ParentGroup.AggregatePerms(); 1970 part.ParentGroup.InvalidateEffectivePerms();
1959 1971
1960 // tell anyone managing scripts that a new script exists 1972 // tell anyone managing scripts that a new script exists
1961 EventManager.TriggerNewScript(agentID, part, taskItem.ItemID); 1973 EventManager.TriggerNewScript(agentID, part, taskItem.ItemID);
@@ -2643,7 +2655,7 @@ namespace OpenSim.Region.Framework.Scenes
2643 2655
2644 // We can only call this after adding the scene object, since the scene object references the scene 2656 // We can only call this after adding the scene object, since the scene object references the scene
2645 // to find out if scripts should be activated at all. 2657 // to find out if scripts should be activated at all.
2646 group.AggregatePerms(); 2658 group.InvalidateEffectivePerms();
2647 group.CreateScriptInstances(param, true, DefaultScriptEngine, 3); 2659 group.CreateScriptInstances(param, true, DefaultScriptEngine, 3);
2648 2660
2649 group.ScheduleGroupForFullUpdate(); 2661 group.ScheduleGroupForFullUpdate();
@@ -2740,7 +2752,7 @@ namespace OpenSim.Region.Framework.Scenes
2740 // and with this comented code, if user does not set next permissions on the object 2752 // and with this comented code, if user does not set next permissions on the object
2741 // and on ALL contents of ALL prims, he may loose rights, making the object useless 2753 // and on ALL contents of ALL prims, he may loose rights, making the object useless
2742 sog.ApplyNextOwnerPermissions(); 2754 sog.ApplyNextOwnerPermissions();
2743 sog.AggregatePerms(); 2755 sog.InvalidateEffectivePerms();
2744 2756
2745 sog.ScheduleGroupForFullUpdate(); 2757 sog.ScheduleGroupForFullUpdate();
2746 2758