aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs17
3 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index ce66e46..ccb3a47 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -795,6 +795,9 @@ 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
798 lock (primsOverMe) 801 lock (primsOverMe)
799 { 802 {
800 if (type == (uint)ObjectReturnType.Owner) 803 if (type == (uint)ObjectReturnType.Owner)
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 46a0da2..6beb6d3 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -168,6 +168,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
168 m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED 168 m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED
169 169
170 m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED 170 m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED
171 m_scene.Permissions.OnUseObjectReturn += CanUseObjectReturn; //NOT YET IMPLEMENTED
171 172
172 m_scene.AddCommand(this, "bypass permissions", 173 m_scene.AddCommand(this, "bypass permissions",
173 "bypass permissions <true / false>", 174 "bypass permissions <true / false>",
@@ -1523,5 +1524,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1523 // You can reset the scripts in any object you can edit 1524 // You can reset the scripts in any object you can edit
1524 return GenericObjectPermission(agentID, prim, false); 1525 return GenericObjectPermission(agentID, prim, false);
1525 } 1526 }
1527
1528 private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, Scene scene)
1529 {
1530 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1531 if (m_bypassPermissions) return m_bypassPermissionsValue;
1532
1533 return GenericParcelPermission(client.AgentId, parcel);
1534 }
1526 } 1535 }
1527} 1536}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index 29a6cd2..731f124 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -79,6 +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 #endregion 83 #endregion
83 84
84 public class ScenePermissions 85 public class ScenePermissions
@@ -135,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes
135 public event CopyUserInventoryHandler OnCopyUserInventory; 136 public event CopyUserInventoryHandler OnCopyUserInventory;
136 public event DeleteUserInventoryHandler OnDeleteUserInventory; 137 public event DeleteUserInventoryHandler OnDeleteUserInventory;
137 public event TeleportHandler OnTeleport; 138 public event TeleportHandler OnTeleport;
139 public event UseObjectReturnHandler OnUseObjectReturn;
138 #endregion 140 #endregion
139 141
140 #region Object Permission Checks 142 #region Object Permission Checks
@@ -910,5 +912,20 @@ namespace OpenSim.Region.Framework.Scenes
910 } 912 }
911 return true; 913 return true;
912 } 914 }
915
916 public bool CanUseObjectReturn(ILandObject landData, uint type , IClientAPI client)
917 {
918 UseObjectReturnHandler handler = OnUseObjectReturn;
919 if (handler != null)
920 {
921 Delegate[] list = handler.GetInvocationList();
922 foreach (UseObjectReturnHandler h in list)
923 {
924 if (h(landData, type, client, m_scene) == false)
925 return false;
926 }
927 }
928 return true;
929 }
913 } 930 }
914} 931}