From 25e2b16451ed68aee4c82ca48f69cb7e0f58cd4e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 17:52:23 +0000 Subject: Apply patch to stop failure of llParcelMediaCommandList() on group deeded land See http://opensimulator.org/mantis/view.php?id=3999 --- .../CoreModules/World/Permissions/PermissionsModule.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 013a0ef..c9b3071 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -800,30 +800,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions } protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers) - { - bool permission = false; - + { if (parcel.LandData.OwnerID == user) { - permission = true; + // Returning immediately so that group deeded objects on group deeded land don't trigger a NRE on + // the subsequent redundant checks when using lParcelMediaCommandList() + // See http://opensimulator.org/mantis/view.php?id=3999 for more details + return true; } if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers)) { - permission = true; + return true; } if (IsEstateManager(user)) { - permission = true; + return true; } if (IsAdministrator(user)) { - permission = true; + return true; } - return permission; + return false; } protected bool GenericParcelPermission(UUID user, Vector3 pos, ulong groupPowers) -- cgit v1.1