diff options
author | UbitUmarov | 2017-01-19 11:34:40 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-19 11:34:40 +0000 |
commit | fe9a785ecc8747df2b15575f0d0bd88025db881b (patch) | |
tree | 5004aec8f297d7aef6f0cf8204ed17d467ded025 /OpenSim/Region/Framework | |
parent | a few more aux methods and changes (diff) | |
download | opensim-SC-fe9a785ecc8747df2b15575f0d0bd88025db881b.zip opensim-SC-fe9a785ecc8747df2b15575f0d0bd88025db881b.tar.gz opensim-SC-fe9a785ecc8747df2b15575f0d0bd88025db881b.tar.bz2 opensim-SC-fe9a785ecc8747df2b15575f0d0bd88025db881b.tar.xz |
object Take and TakeCopy are for in scene SOPs and SPs and permitions module is NOT a shared module
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 473589a..ad913f7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2126,6 +2126,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2126 | List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>(); | 2126 | List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>(); |
2127 | List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>(); | 2127 | List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>(); |
2128 | 2128 | ||
2129 | ScenePresence sp = remoteClient.SceneAgent as ScenePresence; | ||
2130 | |||
2129 | // Start with true for both, then remove the flags if objects | 2131 | // Start with true for both, then remove the flags if objects |
2130 | // that we can't derez are part of the selection | 2132 | // that we can't derez are part of the selection |
2131 | bool permissionToTake = true; | 2133 | bool permissionToTake = true; |
@@ -2180,14 +2182,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2180 | { | 2182 | { |
2181 | if (action == DeRezAction.TakeCopy) | 2183 | if (action == DeRezAction.TakeCopy) |
2182 | { | 2184 | { |
2183 | if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) | 2185 | if (!Permissions.CanTakeCopyObject(grp, sp)) |
2184 | permissionToTakeCopy = false; | 2186 | permissionToTakeCopy = false; |
2185 | } | 2187 | } |
2186 | else | 2188 | else |
2187 | { | 2189 | { |
2188 | permissionToTakeCopy = false; | 2190 | permissionToTakeCopy = false; |
2189 | } | 2191 | } |
2190 | if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) | 2192 | if (!Permissions.CanTakeObject(grp, sp)) |
2191 | permissionToTake = false; | 2193 | permissionToTake = false; |
2192 | 2194 | ||
2193 | if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) | 2195 | if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index e42d4c2..8194606 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -44,9 +44,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
44 | public delegate bool RezObjectHandler(int objectCount, UUID owner, Vector3 objectPosition, Scene scene); | 44 | public delegate bool RezObjectHandler(int objectCount, UUID owner, Vector3 objectPosition, Scene scene); |
45 | public delegate bool DeleteObjectHandler(UUID objectID, UUID deleter, Scene scene); | 45 | public delegate bool DeleteObjectHandler(UUID objectID, UUID deleter, Scene scene); |
46 | public delegate bool TransferObjectHandler(UUID objectID, UUID recipient, Scene scene); | 46 | public delegate bool TransferObjectHandler(UUID objectID, UUID recipient, Scene scene); |
47 | public delegate bool TakeObjectHandler(UUID objectID, UUID stealer, Scene scene); | 47 | public delegate bool TakeObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
48 | public delegate bool SellGroupObjectHandler(UUID userID, UUID groupID, Scene scene); | 48 | public delegate bool SellGroupObjectHandler(UUID userID, UUID groupID, Scene scene); |
49 | public delegate bool TakeCopyObjectHandler(UUID objectID, UUID userID, Scene inScene); | 49 | public delegate bool TakeCopyObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
50 | public delegate bool DuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition); | 50 | public delegate bool DuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition); |
51 | public delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene); | 51 | public delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene); |
52 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); | 52 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); |
@@ -300,7 +300,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
300 | #endregion | 300 | #endregion |
301 | 301 | ||
302 | #region TAKE OBJECT | 302 | #region TAKE OBJECT |
303 | public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID) | 303 | public bool CanTakeObject(SceneObjectGroup sog, ScenePresence sp) |
304 | { | 304 | { |
305 | bool result = true; | 305 | bool result = true; |
306 | 306 | ||
@@ -310,7 +310,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
310 | Delegate[] list = handler.GetInvocationList(); | 310 | Delegate[] list = handler.GetInvocationList(); |
311 | foreach (TakeObjectHandler h in list) | 311 | foreach (TakeObjectHandler h in list) |
312 | { | 312 | { |
313 | if (h(objectID, AvatarTakingUUID, m_scene) == false) | 313 | if (h(sog, sp) == false) |
314 | { | 314 | { |
315 | result = false; | 315 | result = false; |
316 | break; | 316 | break; |
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
357 | 357 | ||
358 | 358 | ||
359 | #region TAKE COPY OBJECT | 359 | #region TAKE COPY OBJECT |
360 | public bool CanTakeCopyObject(UUID objectID, UUID userID) | 360 | public bool CanTakeCopyObject(SceneObjectGroup sog, ScenePresence sp) |
361 | { | 361 | { |
362 | bool result = true; | 362 | bool result = true; |
363 | 363 | ||
@@ -367,7 +367,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
367 | Delegate[] list = handler.GetInvocationList(); | 367 | Delegate[] list = handler.GetInvocationList(); |
368 | foreach (TakeCopyObjectHandler h in list) | 368 | foreach (TakeCopyObjectHandler h in list) |
369 | { | 369 | { |
370 | if (h(objectID, userID, m_scene) == false) | 370 | if (h(sog, sp) == false) |
371 | { | 371 | { |
372 | result = false; | 372 | result = false; |
373 | break; | 373 | break; |