diff options
author | Melanie | 2012-04-27 22:28:09 +0100 |
---|---|---|
committer | Melanie | 2012-04-27 22:28:09 +0100 |
commit | dcbcbd697f70d361b63d502512d2731e0ee6e046 (patch) | |
tree | 8168b0dc214e9cb710b0972d5f03a7da3164189b /OpenSim/Region/CoreModules/World/Permissions | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Fix prebuild.xml (diff) | |
download | opensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.zip opensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.tar.gz opensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.tar.bz2 opensim-SC-dcbcbd697f70d361b63d502512d2731e0ee6e046.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 881b24a..190f63b 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -166,6 +166,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
166 | m_scene.Permissions.OnDeedParcel += CanDeedParcel; | 166 | m_scene.Permissions.OnDeedParcel += CanDeedParcel; |
167 | m_scene.Permissions.OnDeedObject += CanDeedObject; | 167 | m_scene.Permissions.OnDeedObject += CanDeedObject; |
168 | m_scene.Permissions.OnIsGod += IsGod; | 168 | m_scene.Permissions.OnIsGod += IsGod; |
169 | m_scene.Permissions.OnIsGridGod += IsGridGod; | ||
169 | m_scene.Permissions.OnIsAdministrator += IsAdministrator; | 170 | m_scene.Permissions.OnIsAdministrator += IsAdministrator; |
170 | m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; | 171 | m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; |
171 | m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED | 172 | m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED |
@@ -466,22 +467,34 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
466 | if (IsEstateManager(user) && m_RegionManagerIsGod) | 467 | if (IsEstateManager(user) && m_RegionManagerIsGod) |
467 | return true; | 468 | return true; |
468 | 469 | ||
470 | if (IsGridGod(user, null)) | ||
471 | return true; | ||
472 | |||
473 | return false; | ||
474 | } | ||
475 | |||
476 | /// <summary> | ||
477 | /// Is the given user a God throughout the grid (not just in the current scene)? | ||
478 | /// </summary> | ||
479 | /// <param name="user">The user</param> | ||
480 | /// <param name="scene">Unused, can be null</param> | ||
481 | /// <returns></returns> | ||
482 | protected bool IsGridGod(UUID user, Scene scene) | ||
483 | { | ||
484 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | ||
485 | if (m_bypassPermissions) return m_bypassPermissionsValue; | ||
486 | |||
487 | if (user == UUID.Zero) return false; | ||
488 | |||
469 | if (m_allowGridGods) | 489 | if (m_allowGridGods) |
470 | { | 490 | { |
471 | ScenePresence sp = m_scene.GetScenePresence(user); | 491 | ScenePresence sp = m_scene.GetScenePresence(user); |
472 | if (sp != null) | 492 | if (sp != null) |
473 | { | 493 | return (sp.UserLevel >= 200); |
474 | if (sp.UserLevel >= 200) | ||
475 | return true; | ||
476 | return false; | ||
477 | } | ||
478 | 494 | ||
479 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user); | 495 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user); |
480 | if (account != null) | 496 | if (account != null) |
481 | { | 497 | return (account.UserLevel >= 200); |
482 | if (account.UserLevel >= 200) | ||
483 | return true; | ||
484 | } | ||
485 | } | 498 | } |
486 | 499 | ||
487 | return false; | 500 | return false; |