aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2009-06-09 08:15:34 +0000
committerMelanie Thielker2009-06-09 08:15:34 +0000
commit9c726fb178ce329e44fca9bca79a858f8a9ff4ae (patch)
tree042d781206ca828c44df463446e801c29e724dd8 /OpenSim/Region/Framework
parentFrom: Alan Webb <alan_webb@us.ibm.com> (diff)
downloadopensim-SC-9c726fb178ce329e44fca9bca79a858f8a9ff4ae.zip
opensim-SC-9c726fb178ce329e44fca9bca79a858f8a9ff4ae.tar.gz
opensim-SC-9c726fb178ce329e44fca9bca79a858f8a9ff4ae.tar.bz2
opensim-SC-9c726fb178ce329e44fca9bca79a858f8a9ff4ae.tar.xz
Thank you Snoopy, for a patch that implements group permissions.
Applied with changes: - removed spammy debug message - corrected tab formatting
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs27
1 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 6efcaa7..a2a7392 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1526,10 +1526,14 @@ namespace OpenSim.Region.Framework.Scenes
1526 return; 1526 return;
1527 1527
1528 if (part.OwnerID != remoteClient.AgentId) 1528 if (part.OwnerID != remoteClient.AgentId)
1529 return; 1529 {
1530 1530 // Group permissions
1531 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1531 if ( (part.GroupID == UUID.Zero) || (remoteClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0) )
1532 return; 1532 return;
1533 } else {
1534 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
1535 return;
1536 }
1533 1537
1534 if (!Permissions.CanCreateObjectInventory( 1538 if (!Permissions.CanCreateObjectInventory(
1535 itemBase.InvType, part.UUID, remoteClient.AgentId)) 1539 itemBase.InvType, part.UUID, remoteClient.AgentId))
@@ -1598,13 +1602,18 @@ namespace OpenSim.Region.Framework.Scenes
1598 destId); 1602 destId);
1599 return; 1603 return;
1600 } 1604 }
1601 1605
1602 // Must own the object, and have modify rights 1606 // Must own the object, and have modify rights
1603 if (srcPart.OwnerID != destPart.OwnerID) 1607 if (srcPart.OwnerID != destPart.OwnerID)
1604 return; 1608 {
1605 1609 // Group permissions
1606 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) 1610 if ( (destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) ||
1607 return; 1611 ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0) )
1612 return;
1613 } else {
1614 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
1615 return;
1616 }
1608 1617
1609 if (destPart.ScriptAccessPin != pin) 1618 if (destPart.ScriptAccessPin != pin)
1610 { 1619 {