From fbb2a7e90d28bb6a522b4e203e53e1c81cbf25e5 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 6 Jan 2012 17:37:22 +0000 Subject: Add ThreatLevel.NoAccess to OSSL. This allows to enable OSSL without enabling any methods, even those without threat, automatically. It is for use with setups wanting to allow only specific methods to specific users. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 5 ++++- OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 503b5d0..bb0ba3d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -157,6 +157,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api string risk = m_ScriptEngine.Config.GetString("OSFunctionThreatLevel", "VeryLow"); switch (risk) { + case "NoAccess": + m_MaxThreatLevel = ThreatLevel.NoAccess; + break; case "None": m_MaxThreatLevel = ThreatLevel.None; break; @@ -2619,4 +2622,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 00ca070..f5ee733 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -42,6 +42,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces { public enum ThreatLevel { + NoAccess = -1, None = 0, Nuisance = 1, VeryLow = 2, -- cgit v1.1