diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index c55a7a6..a75671e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
53 | public delegate bool DuplicateObjectHandler(SceneObjectGroup sog, ScenePresence sp); | 53 | public delegate bool DuplicateObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
54 | public delegate bool EditObjectByIDsHandler(UUID objectID, UUID editorID); | 54 | public delegate bool EditObjectByIDsHandler(UUID objectID, UUID editorID); |
55 | public delegate bool EditObjectHandler(SceneObjectGroup sog, ScenePresence sp); | 55 | public delegate bool EditObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
56 | public delegate bool EditObjectPermsHandler(SceneObjectGroup sog, UUID editorID); | ||
56 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID); | 57 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID); |
57 | public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); | 58 | public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
58 | public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint); | 59 | public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint); |
@@ -133,6 +134,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
133 | public event DuplicateObjectHandler OnDuplicateObject; | 134 | public event DuplicateObjectHandler OnDuplicateObject; |
134 | public event EditObjectByIDsHandler OnEditObjectByIDs; | 135 | public event EditObjectByIDsHandler OnEditObjectByIDs; |
135 | public event EditObjectHandler OnEditObject; | 136 | public event EditObjectHandler OnEditObject; |
137 | public event EditObjectPermsHandler OnEditObjectPerms; | ||
136 | public event EditObjectInventoryHandler OnEditObjectInventory; | 138 | public event EditObjectInventoryHandler OnEditObjectInventory; |
137 | public event MoveObjectHandler OnMoveObject; | 139 | public event MoveObjectHandler OnMoveObject; |
138 | public event ObjectEntryHandler OnObjectEntry; | 140 | public event ObjectEntryHandler OnObjectEntry; |
@@ -511,6 +513,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
511 | return true; | 513 | return true; |
512 | } | 514 | } |
513 | 515 | ||
516 | public bool CanEditObjectPermissions(SceneObjectGroup sog, UUID editorID) | ||
517 | { | ||
518 | EditObjectPermsHandler handler = OnEditObjectPerms; | ||
519 | if (handler != null) | ||
520 | { | ||
521 | if(sog == null) | ||
522 | return false; | ||
523 | Delegate[] list = handler.GetInvocationList(); | ||
524 | foreach (EditObjectPermsHandler h in list) | ||
525 | { | ||
526 | if (h(sog, editorID) == false) | ||
527 | return false; | ||
528 | } | ||
529 | } | ||
530 | return true; | ||
531 | } | ||
532 | |||
533 | |||
514 | public bool CanEditObjectInventory(UUID objectID, UUID editorID) | 534 | public bool CanEditObjectInventory(UUID objectID, UUID editorID) |
515 | { | 535 | { |
516 | EditObjectInventoryHandler handler = OnEditObjectInventory; | 536 | EditObjectInventoryHandler handler = OnEditObjectInventory; |