diff options
author | UbitUmarov | 2017-01-08 02:00:24 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-08 02:00:24 +0000 |
commit | 45695ef2e335639bb88e184291f05551bc3c146c (patch) | |
tree | 93d24a1e43a7665b94844a302726860b064833b9 /OpenSim/Region/ScriptEngine/Shared | |
parent | Merge branch 'master' into httptests (diff) | |
parent | add the new GOD ossl option to osslEnable.ini (diff) | |
download | opensim-SC-45695ef2e335639bb88e184291f05551bc3c146c.zip opensim-SC-45695ef2e335639bb88e184291f05551bc3c146c.tar.gz opensim-SC-45695ef2e335639bb88e184291f05551bc3c146c.tar.bz2 opensim-SC-45695ef2e335639bb88e184291f05551bc3c146c.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 066f6a4..e769c6d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -310,7 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
310 | foreach (string id in ids) | 310 | foreach (string id in ids) |
311 | { | 311 | { |
312 | string current = id.Trim(); | 312 | string current = id.Trim(); |
313 | if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "GOD" || current.ToUpper() == "GRID_GOD") | 313 | if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "ACTIVE_GOD" || current.ToUpper() == "GRID_GOD" || current.ToUpper() == "GOD") |
314 | { | 314 | { |
315 | if (!perms.AllowedOwnerClasses.Contains(current)) | 315 | if (!perms.AllowedOwnerClasses.Contains(current)) |
316 | perms.AllowedOwnerClasses.Add(current.ToUpper()); | 316 | perms.AllowedOwnerClasses.Add(current.ToUpper()); |
@@ -415,24 +415,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
415 | } | 415 | } |
416 | } | 416 | } |
417 | 417 | ||
418 | //Only gods may use the function | 418 | |
419 | //Only grid gods may use the function | ||
420 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) | ||
421 | { | ||
422 | if (World.Permissions.IsGridGod(ownerID)) | ||
423 | { | ||
424 | return String.Empty; | ||
425 | } | ||
426 | } | ||
427 | |||
428 | //Any god may use the function | ||
419 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) | 429 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) |
420 | { | 430 | { |
421 | if (World.Permissions.IsGod(ownerID)) | 431 | if (World.Permissions.IsAdministrator(ownerID)) |
422 | { | 432 | { |
423 | return String.Empty; | 433 | return String.Empty; |
424 | } | 434 | } |
425 | } | 435 | } |
426 | 436 | ||
427 | //Only grid gods may use the function | 437 | //Only active gods may use the function |
428 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) | 438 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("ACTIVE_GOD")) |
429 | { | 439 | { |
430 | if (World.Permissions.IsGridGod(ownerID)) | 440 | ScenePresence sp = World.GetScenePresence(ownerID); |
441 | if (sp != null && !sp.IsDeleted && sp.IsGod) | ||
431 | { | 442 | { |
432 | return String.Empty; | 443 | return String.Empty; |
433 | } | 444 | } |
434 | } | 445 | } |
435 | 446 | ||
447 | |||
436 | if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) | 448 | if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) |
437 | return( | 449 | return( |
438 | String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", | 450 | String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", |