diff options
Fixed a bug in the permissions module, where if there were multiple admins, the client permissions flags were sent incorrectly, which stopped one admin being able to edit another admin's objects. Even thought the comments in the code said that admins should be able to edit each other's objects.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index b8efc4a..6c6151e 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -450,14 +450,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
450 | return objectOwnerMask; | 450 | return objectOwnerMask; |
451 | } | 451 | } |
452 | 452 | ||
453 | // Users should be able to edit what is over their land. | 453 | //// Users should be able to edit what is over their land. |
454 | ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); | 454 | //ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); |
455 | if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod) | 455 | //if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod) |
456 | return objectOwnerMask; | 456 | // return objectOwnerMask; |
457 | 457 | ||
458 | // Admin objects should not be editable by the above | 458 | //// Admin objects should not be editable by the above |
459 | if (IsAdministrator(objectOwner)) | 459 | //if (IsAdministrator(objectOwner)) |
460 | return objectEveryoneMask; | 460 | // return objectEveryoneMask; |
461 | 461 | ||
462 | // Estate users should be able to edit anything in the sim | 462 | // Estate users should be able to edit anything in the sim |
463 | if (IsEstateManager(user) && m_RegionOwnerIsGod) | 463 | if (IsEstateManager(user) && m_RegionOwnerIsGod) |
@@ -467,6 +467,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
467 | if (IsAdministrator(user)) | 467 | if (IsAdministrator(user)) |
468 | return objectOwnerMask; | 468 | return objectOwnerMask; |
469 | 469 | ||
470 | // Users should be able to edit what is over their land. | ||
471 | ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); | ||
472 | if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod) | ||
473 | { | ||
474 | uint responseMask = objectOwnerMask; | ||
475 | |||
476 | // Admin objects should not be editable by the above | ||
477 | if (IsAdministrator(objectOwner)) | ||
478 | { | ||
479 | responseMask = objectEveryoneMask; | ||
480 | } | ||
481 | |||
482 | return responseMask; | ||
483 | } | ||
470 | 484 | ||
471 | return objectEveryoneMask; | 485 | return objectEveryoneMask; |
472 | } | 486 | } |