Allow the perms module to inspect and modify the list of objects to return

for more fine-grained control
This commit is contained in:
Melanie Thielker
2009-05-24 17:20:47 +00:00
parent c028d0a3c1
commit ca75c101ec
3 changed files with 8 additions and 8 deletions

View File

@@ -795,9 +795,6 @@ namespace OpenSim.Region.CoreModules.World.Land
Dictionary<UUID,List<SceneObjectGroup>> returns =
new Dictionary<UUID,List<SceneObjectGroup>>();
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<SceneObjectGroup> 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

View File

@@ -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<SceneObjectGroup> retlist, Scene scene)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;