diff options
author | Justin Clark-Casey (justincc) | 2012-05-17 01:30:50 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-17 01:30:50 +0100 |
commit | 6b6a00a3d593ce164d23135cb3fe570a511e1793 (patch) | |
tree | 2229161efe60d8e0398646b0e72a519bd96aaa07 /OpenSim/Region | |
parent | Add regression TestSameSimulatorSeparatedRegionsQueryAccessFails() (diff) | |
download | opensim-SC_OLD-6b6a00a3d593ce164d23135cb3fe570a511e1793.zip opensim-SC_OLD-6b6a00a3d593ce164d23135cb3fe570a511e1793.tar.gz opensim-SC_OLD-6b6a00a3d593ce164d23135cb3fe570a511e1793.tar.bz2 opensim-SC_OLD-6b6a00a3d593ce164d23135cb3fe570a511e1793.tar.xz |
minor: Remove redundant EstateOwner != UUID.Zero check in IsAdministrator because checking EstateOwner == user
Due to an earlier check we already know that user != UUID.Zero so if EstateOwner == UUID.Zero, EstateOwner == user can never be true
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 7d75fad..555509c 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -450,19 +450,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
450 | } | 450 | } |
451 | 451 | ||
452 | /// <summary> | 452 | /// <summary> |
453 | /// Is the given user an administrator (in other words, a god)? | 453 | /// Is the user regarded as an administrator? |
454 | /// </summary> | 454 | /// </summary> |
455 | /// <param name="user"></param> | 455 | /// <param name="user"></param> |
456 | /// <returns></returns> | 456 | /// <returns></returns> |
457 | protected bool IsAdministrator(UUID user) | 457 | protected bool IsAdministrator(UUID user) |
458 | { | 458 | { |
459 | if (user == UUID.Zero) return false; | 459 | if (user == UUID.Zero) |
460 | 460 | return false; | |
461 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) | 461 | |
462 | { | 462 | if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod) |
463 | if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod) | 463 | return true; |
464 | return true; | ||
465 | } | ||
466 | 464 | ||
467 | if (IsEstateManager(user) && m_RegionManagerIsGod) | 465 | if (IsEstateManager(user) && m_RegionManagerIsGod) |
468 | return true; | 466 | return true; |