diff options
author | Justin Clarke Casey | 2008-11-21 17:28:57 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-21 17:28:57 +0000 |
commit | c2d3d8d88e05654a457a5d0591c19ba9337ed527 (patch) | |
tree | 7f687cce6c4ddd82a62ad89e583797c23234d18f /OpenSim/Region | |
parent | Fully implement object return from the parcel dialog (diff) | |
download | opensim-SC-c2d3d8d88e05654a457a5d0591c19ba9337ed527.zip opensim-SC-c2d3d8d88e05654a457a5d0591c19ba9337ed527.tar.gz opensim-SC-c2d3d8d88e05654a457a5d0591c19ba9337ed527.tar.bz2 opensim-SC-c2d3d8d88e05654a457a5d0591c19ba9337ed527.tar.xz |
* Improve and correct messages given to the user when permission is denied for a particular OSSL function
* I don't believe that the extra information given is anything that couldn't be worked out by trial and error
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index cfe5c48..f46fdae 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -183,7 +183,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
183 | public void CheckThreatLevel(ThreatLevel level, string function) | 183 | public void CheckThreatLevel(ThreatLevel level, string function) |
184 | { | 184 | { |
185 | if (!m_OSFunctionsEnabled) | 185 | if (!m_OSFunctionsEnabled) |
186 | OSSLError(function+": permission denied"); // throws | 186 | OSSLError(String.Format("{0} permission denied. All OS functions are disabled.", function)); // throws |
187 | 187 | ||
188 | if (!m_FunctionPerms.ContainsKey(function)) | 188 | if (!m_FunctionPerms.ContainsKey(function)) |
189 | { | 189 | { |
@@ -239,14 +239,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
239 | if (m_FunctionPerms[function] == null) // No list = true | 239 | if (m_FunctionPerms[function] == null) // No list = true |
240 | { | 240 | { |
241 | if (level > m_MaxThreatLevel) | 241 | if (level > m_MaxThreatLevel) |
242 | throw new Exception("Threat level too high - "+function); | 242 | OSSLError( |
243 | String.Format( | ||
244 | "{0} permission denied. Allowed threat level is {1} but function threat level is {2}.", | ||
245 | function, m_MaxThreatLevel, level)); | ||
243 | } | 246 | } |
244 | else | 247 | else |
245 | { | 248 | { |
246 | if (!m_FunctionPerms[function].Contains(UUID.Zero)) | 249 | if (!m_FunctionPerms[function].Contains(UUID.Zero)) |
247 | { | 250 | { |
248 | if (!m_FunctionPerms[function].Contains(m_host.OwnerID)) | 251 | if (!m_FunctionPerms[function].Contains(m_host.OwnerID)) |
249 | throw new Exception("Threat level too high - "+function); | 252 | OSSLError( |
253 | String.Format("{0} permission denied. Prim owner is not in the list of users allowed to execute this function.", | ||
254 | function)); | ||
250 | } | 255 | } |
251 | } | 256 | } |
252 | } | 257 | } |