From ca75c101ecf908bdbf6a7993082d77ae6ed9518c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 24 May 2009 17:20:47 +0000 Subject: Allow the perms module to inspect and modify the list of objects to return for more fine-grained control --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 8 ++++---- OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index ccb3a47..414d1a5 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -795,9 +795,6 @@ namespace OpenSim.Region.CoreModules.World.Land Dictionary> returns = new Dictionary>(); - if (!m_scene.Permissions.CanUseObjectReturn(this, type, remote_client)) - return; - lock (primsOverMe) { if (type == (uint)ObjectReturnType.Owner) @@ -859,7 +856,10 @@ namespace OpenSim.Region.CoreModules.World.Land } foreach (List ol in returns.Values) - m_scene.returnObjects(ol.ToArray(), remote_client.AgentId); + { + if (m_scene.Permissions.CanUseObjectReturn(this, type, remote_client, ol)) + m_scene.returnObjects(ol.ToArray(), remote_client.AgentId); + } } #endregion diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 33b9288..ff57192 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -1525,7 +1525,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions return GenericObjectPermission(agentID, prim, false); } - private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, Scene scene) + private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, List retlist, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; -- cgit v1.1