aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs33
1 files changed, 20 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index b012f5f..f3afac7 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1473,19 +1473,25 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1473 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1473 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1474 if (m_bypassPermissions) return m_bypassPermissionsValue; 1474 if (m_bypassPermissions) return m_bypassPermissionsValue;
1475 1475
1476 GroupPowers powers;
1477 ILandObject l;
1478
1479 ScenePresence sp = scene.GetScenePresence(user); 1476 ScenePresence sp = scene.GetScenePresence(user);
1480 if (sp == null) 1477 if (sp == null)
1481 return false; 1478 return false;
1482 1479
1480 bool isPrivUser = sp.IsGod || IsEstateManager(user);
1481
1483 IClientAPI client = sp.ControllingClient; 1482 IClientAPI client = sp.ControllingClient;
1484 uint perms; 1483 GroupPowers powers;
1484 ILandObject l;
1485
1485 foreach (SceneObjectGroup g in new List<SceneObjectGroup>(objects)) 1486 foreach (SceneObjectGroup g in new List<SceneObjectGroup>(objects))
1486 { 1487 {
1487 perms = GetObjectPermissions(sp, g, false); 1488 if(g.IsAttachment)
1488 if((perms & (uint)PermissionMask.Modify) == 0) //?? 1489 {
1490 objects.Remove(g);
1491 continue;
1492 }
1493
1494 if (isPrivUser || g.OwnerID == user)
1489 continue; 1495 continue;
1490 1496
1491 // This is a short cut for efficiency. If land is non-null, 1497 // This is a short cut for efficiency. If land is non-null,
@@ -1499,27 +1505,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1499 else 1505 else
1500 { 1506 {
1501 Vector3 pos = g.AbsolutePosition; 1507 Vector3 pos = g.AbsolutePosition;
1502
1503 l = scene.LandChannel.GetLandObject(pos.X, pos.Y); 1508 l = scene.LandChannel.GetLandObject(pos.X, pos.Y);
1504 } 1509 }
1505 1510
1506 // If it's not over any land, then we can't do a thing 1511 // If it's not over any land, then we can't do a thing
1507 if (l == null) 1512 if (l == null || l.LandData == null)
1508 { 1513 {
1509 objects.Remove(g); 1514 objects.Remove(g);
1510 continue; 1515 continue;
1511 } 1516 }
1512 1517
1518 LandData ldata = l.LandData;
1513 // If we own the land outright, then allow 1519 // If we own the land outright, then allow
1514 // 1520 //
1515 if (l.LandData.OwnerID == user) 1521 if (ldata.OwnerID == user)
1516 continue; 1522 continue;
1517 1523
1518 // Group voodoo 1524 // Group voodoo
1519 // 1525 //
1520 if (l.LandData.IsGroupOwned) 1526 if (ldata.IsGroupOwned)
1521 { 1527 {
1522 powers = (GroupPowers)client.GetGroupPowers(l.LandData.GroupID); 1528 UUID lGroupID = ldata.GroupID;
1529 powers = (GroupPowers)client.GetGroupPowers(lGroupID);
1523 // Not a group member, or no rights at all 1530 // Not a group member, or no rights at all
1524 // 1531 //
1525 if (powers == (GroupPowers)0) 1532 if (powers == (GroupPowers)0)
@@ -1530,7 +1537,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1530 1537
1531 // Group deeded object? 1538 // Group deeded object?
1532 // 1539 //
1533 if (g.OwnerID == l.LandData.GroupID && 1540 if (g.OwnerID == lGroupID &&
1534 (powers & GroupPowers.ReturnGroupOwned) == (GroupPowers)0) 1541 (powers & GroupPowers.ReturnGroupOwned) == (GroupPowers)0)
1535 { 1542 {
1536 objects.Remove(g); 1543 objects.Remove(g);
@@ -1539,7 +1546,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1539 1546
1540 // Group set object? 1547 // Group set object?
1541 // 1548 //
1542 if (g.GroupID == l.LandData.GroupID && 1549 if (g.GroupID == lGroupID &&
1543 (powers & GroupPowers.ReturnGroupSet) == (GroupPowers)0) 1550 (powers & GroupPowers.ReturnGroupSet) == (GroupPowers)0)
1544 { 1551 {
1545 objects.Remove(g); 1552 objects.Remove(g);