diff options
author | Melanie Thielker | 2009-06-05 09:47:42 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-06-05 09:47:42 +0000 |
commit | 9f932a42057b4a9cd4517c90007a7c31c98277c6 (patch) | |
tree | b0183d1d5317e9408c73924a3a97cb31e3a4adf7 /OpenSim/Region/ScriptEngine/Shared/CodeTools | |
parent | * convenience ignores (diff) | |
download | opensim-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/ScriptEngine/Shared/CodeTools')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index fcb3339..911da5b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -37,6 +37,7 @@ using Microsoft.VisualBasic; | |||
37 | using log4net; | 37 | using log4net; |
38 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.ScriptEngine.Interfaces; | 39 | using OpenSim.Region.ScriptEngine.Interfaces; |
40 | using OpenMetaverse; | ||
40 | 41 | ||
41 | namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | 42 | namespace OpenSim.Region.ScriptEngine.Shared.CodeTools |
42 | { | 43 | { |
@@ -263,7 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
263 | /// </summary> | 264 | /// </summary> |
264 | /// <param name="Script">LSL script</param> | 265 | /// <param name="Script">LSL script</param> |
265 | /// <returns>Filename to .dll assembly</returns> | 266 | /// <returns>Filename to .dll assembly</returns> |
266 | public string PerformScriptCompile(string Script, string asset) | 267 | public string PerformScriptCompile(string Script, string asset, UUID ownerUUID) |
267 | { | 268 | { |
268 | m_positionMap = null; | 269 | m_positionMap = null; |
269 | m_warnings.Clear(); | 270 | m_warnings.Clear(); |
@@ -341,6 +342,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
341 | throw new Exception(errtext); | 342 | throw new Exception(errtext); |
342 | } | 343 | } |
343 | 344 | ||
345 | if(m_scriptEngine.World.Permissions.CanCompileScript(ownerUUID, (int)l) == false) { | ||
346 | // Not allowed to compile to this language! | ||
347 | string errtext = String.Empty; | ||
348 | errtext += ownerUUID + " is not in list of allowed users for this scripting language. Script will not be executed!"; | ||
349 | throw new Exception(errtext); | ||
350 | } | ||
351 | |||
344 | string compileScript = Script; | 352 | string compileScript = Script; |
345 | 353 | ||
346 | if (l == enumCompileType.lsl) | 354 | if (l == enumCompileType.lsl) |