diff options
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index ff57192..1987bb9 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1551,8 +1551,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1551 | } | 1551 | } |
1552 | break; | 1552 | break; |
1553 | case (uint)ObjectReturnType.Group: | 1553 | case (uint)ObjectReturnType.Group: |
1554 | if ((powers & (long)GroupPowers.ReturnGroupSet) != 0) | 1554 | if (parcel.landData.OwnerID != client.AgentId) |
1555 | return true; | 1555 | { |
1556 | // If permissionis granted through a group... | ||
1557 | // | ||
1558 | if ((powers & (long)GroupPowers.ReturnGroupSet) != 0) | ||
1559 | { | ||
1560 | foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist)) | ||
1561 | { | ||
1562 | // check for and remove group owned objects unless | ||
1563 | // the user also has permissions to return those | ||
1564 | // | ||
1565 | if (g.OwnerID == g.GroupID && | ||
1566 | ((powers & (long)GroupPowers.ReturnGroupOwned) == 0)) | ||
1567 | { | ||
1568 | retlist.Remove(g); | ||
1569 | } | ||
1570 | } | ||
1571 | // And allow the operation | ||
1572 | // | ||
1573 | return true; | ||
1574 | } | ||
1575 | } | ||
1556 | break; | 1576 | break; |
1557 | case (uint)ObjectReturnType.Other: | 1577 | case (uint)ObjectReturnType.Other: |
1558 | if ((powers & (long)GroupPowers.ReturnNonGroup) != 0) | 1578 | if ((powers & (long)GroupPowers.ReturnNonGroup) != 0) |