From 04a195266bd68f8c62129246a98aefb3201c90f1 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Mon, 13 Feb 2012 13:21:42 -0800 Subject: [PATCH] short circuit the expensive parts of the permission checking code if the current user is the owner of an object. none of the later checks can reverse the outcome. --- .../CoreModules/World/Permissions/PermissionsModule.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index cdecd2f471..f3c6a30e64 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -707,7 +707,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions // Object owners should be able to edit their own content if (currentUser == objectOwner) { - permission = true; + // there is no way that later code can change this back to false + // so just return true immediately and short circuit the more + // expensive group checks + return true; + + //permission = true; } else if (group.IsAttachment) {