aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorDiva Canto2016-06-20 10:08:15 -0700
committerDiva Canto2016-06-20 10:08:15 -0700
commit359908fa88c4f9188746e87350701750478fbf2f (patch)
treee15d62226bb52b8cdaf92eb9847ca008bef68f1e /OpenSim/Region/Framework
parentMantis #7929: objects deeded to the group were loosing some important propert... (diff)
downloadopensim-SC-359908fa88c4f9188746e87350701750478fbf2f.zip
opensim-SC-359908fa88c4f9188746e87350701750478fbf2f.tar.gz
opensim-SC-359908fa88c4f9188746e87350701750478fbf2f.tar.bz2
opensim-SC-359908fa88c4f9188746e87350701750478fbf2f.tar.xz
Related to mantis #7929: "For sale" was not being accepted, because of permissions fail. This adds a new permissions check CanSellGroupObject. THIRD-PARTY PERMISSIONS MODULES TAKE NOTE OF THIS NEW EVENT.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index a901cfe..b26b789 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -45,6 +45,7 @@ namespace OpenSim.Region.Framework.Scenes
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(UUID objectID, UUID stealer, Scene scene);
48 public delegate bool SellGroupObjectHandler(UUID userID, UUID groupID, Scene scene);
48 public delegate bool TakeCopyObjectHandler(UUID objectID, UUID userID, Scene inScene); 49 public delegate bool TakeCopyObjectHandler(UUID objectID, UUID userID, Scene inScene);
49 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);
50 public delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene); 51 public delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene);
@@ -114,6 +115,7 @@ namespace OpenSim.Region.Framework.Scenes
114 public event DeleteObjectHandler OnDeleteObject; 115 public event DeleteObjectHandler OnDeleteObject;
115 public event TransferObjectHandler OnTransferObject; 116 public event TransferObjectHandler OnTransferObject;
116 public event TakeObjectHandler OnTakeObject; 117 public event TakeObjectHandler OnTakeObject;
118 public event SellGroupObjectHandler OnSellGroupObject;
117 public event TakeCopyObjectHandler OnTakeCopyObject; 119 public event TakeCopyObjectHandler OnTakeCopyObject;
118 public event DuplicateObjectHandler OnDuplicateObject; 120 public event DuplicateObjectHandler OnDuplicateObject;
119 public event EditObjectHandler OnEditObject; 121 public event EditObjectHandler OnEditObject;
@@ -328,6 +330,35 @@ namespace OpenSim.Region.Framework.Scenes
328 330
329 #endregion 331 #endregion
330 332
333 #region SELL GROUP OBJECT
334 public bool CanSellGroupObject(UUID userID, UUID groupID, Scene scene)
335 {
336 bool result = true;
337
338 SellGroupObjectHandler handler = OnSellGroupObject;
339 if (handler != null)
340 {
341 Delegate[] list = handler.GetInvocationList();
342 foreach (SellGroupObjectHandler h in list)
343 {
344 if (h(userID, groupID, scene) == false)
345 {
346 result = false;
347 break;
348 }
349 }
350 }
351
352 //m_log.DebugFormat(
353 // "[SCENE PERMISSIONS]: CanSellGroupObject() fired for user {0}, group {1}, result {2}",
354 // userID, groupID, result);
355
356 return result;
357 }
358
359 #endregion
360
361
331 #region TAKE COPY OBJECT 362 #region TAKE COPY OBJECT
332 public bool CanTakeCopyObject(UUID objectID, UUID userID) 363 public bool CanTakeCopyObject(UUID objectID, UUID userID)
333 { 364 {