diff options
author | Melanie Thielker | 2009-05-24 16:55:34 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-24 16:55:34 +0000 |
commit | c028d0a3c10024efcac1272d569e2b6e5e4d0176 (patch) | |
tree | 959ef17761db96d1a1f31b272f841096604dd65d /OpenSim/Region | |
parent | Add a new permissions check for bulk object returns. (diff) | |
download | opensim-SC-c028d0a3c10024efcac1272d569e2b6e5e4d0176.zip opensim-SC-c028d0a3c10024efcac1272d569e2b6e5e4d0176.tar.gz opensim-SC-c028d0a3c10024efcac1272d569e2b6e5e4d0176.tar.bz2 opensim-SC-c028d0a3c10024efcac1272d569e2b6e5e4d0176.tar.xz |
Make group permissions control what a user can return.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 6beb6d3..33b9288 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1530,6 +1530,38 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1530 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1530 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1531 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1531 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1532 | 1532 | ||
1533 | long powers = 0; | ||
1534 | if (parcel.landData.GroupID != UUID.Zero) | ||
1535 | client.GetGroupPowers(parcel.landData.GroupID); | ||
1536 | |||
1537 | switch (type) | ||
1538 | { | ||
1539 | case (uint)ObjectReturnType.Owner: | ||
1540 | // Don't let group members return owner's objects, ever | ||
1541 | // | ||
1542 | if (parcel.landData.IsGroupOwned) | ||
1543 | { | ||
1544 | if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0) | ||
1545 | return true; | ||
1546 | } | ||
1547 | else | ||
1548 | { | ||
1549 | if (parcel.landData.OwnerID != client.AgentId) | ||
1550 | return false; | ||
1551 | } | ||
1552 | break; | ||
1553 | case (uint)ObjectReturnType.Group: | ||
1554 | if ((powers & (long)GroupPowers.ReturnGroupSet) != 0) | ||
1555 | return true; | ||
1556 | break; | ||
1557 | case (uint)ObjectReturnType.Other: | ||
1558 | if ((powers & (long)GroupPowers.ReturnNonGroup) != 0) | ||
1559 | return true; | ||
1560 | break; | ||
1561 | case (uint)ObjectReturnType.List: | ||
1562 | break; | ||
1563 | } | ||
1564 | |||
1533 | return GenericParcelPermission(client.AgentId, parcel); | 1565 | return GenericParcelPermission(client.AgentId, parcel); |
1534 | } | 1566 | } |
1535 | } | 1567 | } |