diff options
author | Melanie Thielker | 2009-05-24 16:11:35 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-24 16:11:35 +0000 |
commit | f3f7d603675ac15d6397b50591b598aacc932862 (patch) | |
tree | c34b79e157ca87266c409a786eba3bdbd4158a60 /OpenSim/Region/Framework/Scenes | |
parent | Fixes map image on link-region (HG). (diff) | |
download | opensim-SC_OLD-f3f7d603675ac15d6397b50591b598aacc932862.zip opensim-SC_OLD-f3f7d603675ac15d6397b50591b598aacc932862.tar.gz opensim-SC_OLD-f3f7d603675ac15d6397b50591b598aacc932862.tar.bz2 opensim-SC_OLD-f3f7d603675ac15d6397b50591b598aacc932862.tar.xz |
Add a new permissions check for bulk object returns.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 17 |
1 files changed, 17 insertions, 0 deletions
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 | } |