mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user