aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-24 17:29:40 +0000
committerMelanie Thielker2009-05-24 17:29:40 +0000
commit4e64bf9360604ea30d2d1c5389dd2d36aa93d6ff (patch)
treec18a261fc9d8cbe0bcad7b50e82431d37907ce07
parentAllow the perms module to inspect and modify the list of objects to return (diff)
downloadopensim-SC-4e64bf9360604ea30d2d1c5389dd2d36aa93d6ff.zip
opensim-SC-4e64bf9360604ea30d2d1c5389dd2d36aa93d6ff.tar.gz
opensim-SC-4e64bf9360604ea30d2d1c5389dd2d36aa93d6ff.tar.bz2
opensim-SC-4e64bf9360604ea30d2d1c5389dd2d36aa93d6ff.tar.xz
Prevent group deeded objects from being returned by the group return option
unless the user has that permission through the group.
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs24
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index ff57192..1987bb9 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1551,8 +1551,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1551 } 1551 }
1552 break; 1552 break;
1553 case (uint)ObjectReturnType.Group: 1553 case (uint)ObjectReturnType.Group:
1554 if ((powers & (long)GroupPowers.ReturnGroupSet) != 0) 1554 if (parcel.landData.OwnerID != client.AgentId)
1555 return true; 1555 {
1556 // If permissionis granted through a group...
1557 //
1558 if ((powers & (long)GroupPowers.ReturnGroupSet) != 0)
1559 {
1560 foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist))
1561 {
1562 // check for and remove group owned objects unless
1563 // the user also has permissions to return those
1564 //
1565 if (g.OwnerID == g.GroupID &&
1566 ((powers & (long)GroupPowers.ReturnGroupOwned) == 0))
1567 {
1568 retlist.Remove(g);
1569 }
1570 }
1571 // And allow the operation
1572 //
1573 return true;
1574 }
1575 }
1556 break; 1576 break;
1557 case (uint)ObjectReturnType.Other: 1577 case (uint)ObjectReturnType.Other:
1558 if ((powers & (long)GroupPowers.ReturnNonGroup) != 0) 1578 if ((powers & (long)GroupPowers.ReturnNonGroup) != 0)