aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2009-06-05 09:47:42 +0000
committerMelanie Thielker2009-06-05 09:47:42 +0000
commit9f932a42057b4a9cd4517c90007a7c31c98277c6 (patch)
treeb0183d1d5317e9408c73924a3a97cb31e3a4adf7 /OpenSim/Region/Framework/Scenes
parent* convenience ignores (diff)
downloadopensim-SC_OLD-9f932a42057b4a9cd4517c90007a7c31c98277c6.zip
opensim-SC_OLD-9f932a42057b4a9cd4517c90007a7c31c98277c6.tar.gz
opensim-SC_OLD-9f932a42057b4a9cd4517c90007a7c31c98277c6.tar.bz2
opensim-SC_OLD-9f932a42057b4a9cd4517c90007a7c31c98277c6.tar.xz
Thank you, thomax, for a patch to provide finer-grained access control to
scripting. Fixes Mantis #2862
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs20
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 ab5f264..d0da618 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -56,6 +56,7 @@ namespace OpenSim.Region.Framework.Scenes
56 public delegate bool EditScriptHandler(UUID script, UUID objectID, UUID user, Scene scene); 56 public delegate bool EditScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
57 public delegate bool EditNotecardHandler(UUID notecard, UUID objectID, UUID user, Scene scene); 57 public delegate bool EditNotecardHandler(UUID notecard, UUID objectID, UUID user, Scene scene);
58 public delegate bool RunScriptHandler(UUID script, UUID objectID, UUID user, Scene scene); 58 public delegate bool RunScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
59 public delegate bool CompileScriptHandler(UUID ownerUUID, int scriptType, Scene scene);
59 public delegate bool StartScriptHandler(UUID script, UUID user, Scene scene); 60 public delegate bool StartScriptHandler(UUID script, UUID user, Scene scene);
60 public delegate bool StopScriptHandler(UUID script, UUID user, Scene scene); 61 public delegate bool StopScriptHandler(UUID script, UUID user, Scene scene);
61 public delegate bool ResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene); 62 public delegate bool ResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene);
@@ -113,6 +114,7 @@ namespace OpenSim.Region.Framework.Scenes
113 public event EditScriptHandler OnEditScript; 114 public event EditScriptHandler OnEditScript;
114 public event EditNotecardHandler OnEditNotecard; 115 public event EditNotecardHandler OnEditNotecard;
115 public event RunScriptHandler OnRunScript; 116 public event RunScriptHandler OnRunScript;
117 public event CompileScriptHandler OnCompileScript;
116 public event StartScriptHandler OnStartScript; 118 public event StartScriptHandler OnStartScript;
117 public event StopScriptHandler OnStopScript; 119 public event StopScriptHandler OnStopScript;
118 public event ResetScriptHandler OnResetScript; 120 public event ResetScriptHandler OnResetScript;
@@ -510,6 +512,24 @@ namespace OpenSim.Region.Framework.Scenes
510 512
511 #endregion 513 #endregion
512 514
515 #region COMPILE SCRIPT (When Script needs to get (re)compiled)
516 public bool CanCompileScript(UUID ownerUUID, int scriptType)
517 {
518 CompileScriptHandler handler = OnCompileScript;
519 if (handler != null)
520 {
521 Delegate[] list = handler.GetInvocationList();
522 foreach (CompileScriptHandler h in list)
523 {
524 if (h(ownerUUID, scriptType, m_scene) == false)
525 return false;
526 }
527 }
528 return true;
529 }
530
531 #endregion
532
513 #region START SCRIPT (When Script run box is Checked after placed in object) 533 #region START SCRIPT (When Script run box is Checked after placed in object)
514 public bool CanStartScript(UUID script, UUID user) 534 public bool CanStartScript(UUID script, UUID user)
515 { 535 {