aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-24 17:20:47 +0000
committerMelanie Thielker2009-05-24 17:20:47 +0000
commitca75c101ecf908bdbf6a7993082d77ae6ed9518c (patch)
tree9b9fe7d608fb5f72cd689789eb97789fefc817df /OpenSim/Region
parentMake group permissions control what a user can return. (diff)
downloadopensim-SC-ca75c101ecf908bdbf6a7993082d77ae6ed9518c.zip
opensim-SC-ca75c101ecf908bdbf6a7993082d77ae6ed9518c.tar.gz
opensim-SC-ca75c101ecf908bdbf6a7993082d77ae6ed9518c.tar.bz2
opensim-SC-ca75c101ecf908bdbf6a7993082d77ae6ed9518c.tar.xz
Allow the perms module to inspect and modify the list of objects to return
for more fine-grained control
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs6
3 files changed, 8 insertions, 8 deletions
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
795 Dictionary<UUID,List<SceneObjectGroup>> returns = 795 Dictionary<UUID,List<SceneObjectGroup>> returns =
796 new Dictionary<UUID,List<SceneObjectGroup>>(); 796 new Dictionary<UUID,List<SceneObjectGroup>>();
797 797
798 if (!m_scene.Permissions.CanUseObjectReturn(this, type, remote_client))
799 return;
800
801 lock (primsOverMe) 798 lock (primsOverMe)
802 { 799 {
803 if (type == (uint)ObjectReturnType.Owner) 800 if (type == (uint)ObjectReturnType.Owner)
@@ -859,7 +856,10 @@ namespace OpenSim.Region.CoreModules.World.Land
859 } 856 }
860 857
861 foreach (List<SceneObjectGroup> ol in returns.Values) 858 foreach (List<SceneObjectGroup> ol in returns.Values)
862 m_scene.returnObjects(ol.ToArray(), remote_client.AgentId); 859 {
860 if (m_scene.Permissions.CanUseObjectReturn(this, type, remote_client, ol))
861 m_scene.returnObjects(ol.ToArray(), remote_client.AgentId);
862 }
863 } 863 }
864 864
865 #endregion 865 #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
1525 return GenericObjectPermission(agentID, prim, false); 1525 return GenericObjectPermission(agentID, prim, false);
1526 } 1526 }
1527 1527
1528 private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, Scene scene) 1528 private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
1529 { 1529 {
1530 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1530 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1531 if (m_bypassPermissions) return m_bypassPermissionsValue; 1531 if (m_bypassPermissions) return m_bypassPermissionsValue;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index 731f124..b6f3fee 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Framework.Scenes
79 public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID); 79 public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID);
80 public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID); 80 public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID);
81 public delegate bool TeleportHandler(UUID userID, Scene scene); 81 public delegate bool TeleportHandler(UUID userID, Scene scene);
82 public delegate bool UseObjectReturnHandler(ILandObject landData, uint type, IClientAPI client, Scene scene); 82 public delegate bool UseObjectReturnHandler(ILandObject landData, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene);
83 #endregion 83 #endregion
84 84
85 public class ScenePermissions 85 public class ScenePermissions
@@ -913,7 +913,7 @@ namespace OpenSim.Region.Framework.Scenes
913 return true; 913 return true;
914 } 914 }
915 915
916 public bool CanUseObjectReturn(ILandObject landData, uint type , IClientAPI client) 916 public bool CanUseObjectReturn(ILandObject landData, uint type , IClientAPI client, List<SceneObjectGroup> retlist)
917 { 917 {
918 UseObjectReturnHandler handler = OnUseObjectReturn; 918 UseObjectReturnHandler handler = OnUseObjectReturn;
919 if (handler != null) 919 if (handler != null)
@@ -921,7 +921,7 @@ namespace OpenSim.Region.Framework.Scenes
921 Delegate[] list = handler.GetInvocationList(); 921 Delegate[] list = handler.GetInvocationList();
922 foreach (UseObjectReturnHandler h in list) 922 foreach (UseObjectReturnHandler h in list)
923 { 923 {
924 if (h(landData, type, client, m_scene) == false) 924 if (h(landData, type, client, retlist, m_scene) == false)
925 return false; 925 return false;
926 } 926 }
927 } 927 }