diff options
author | Mic Bowman | 2012-02-13 13:21:42 -0800 |
---|---|---|
committer | Mic Bowman | 2012-02-13 13:21:42 -0800 |
commit | 04a195266bd68f8c62129246a98aefb3201c90f1 (patch) | |
tree | fa87ddcbfdd7fad4dd5fa2dbaf2a8c7b18732c2a | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-04a195266bd68f8c62129246a98aefb3201c90f1.zip opensim-SC_OLD-04a195266bd68f8c62129246a98aefb3201c90f1.tar.gz opensim-SC_OLD-04a195266bd68f8c62129246a98aefb3201c90f1.tar.bz2 opensim-SC_OLD-04a195266bd68f8c62129246a98aefb3201c90f1.tar.xz |
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.
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index cdecd2f..f3c6a30 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 | |||
707 | // Object owners should be able to edit their own content | 707 | // Object owners should be able to edit their own content |
708 | if (currentUser == objectOwner) | 708 | if (currentUser == objectOwner) |
709 | { | 709 | { |
710 | permission = true; | 710 | // there is no way that later code can change this back to false |
711 | // so just return true immediately and short circuit the more | ||
712 | // expensive group checks | ||
713 | return true; | ||
714 | |||
715 | //permission = true; | ||
711 | } | 716 | } |
712 | else if (group.IsAttachment) | 717 | else if (group.IsAttachment) |
713 | { | 718 | { |