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.

This commit is contained in:
MW
2009-04-30 14:56:26 +00:00
parent 334738fca9
commit ceb4db5272

View File

@@ -450,14 +450,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return objectOwnerMask;
}
// Users should be able to edit what is over their land.
ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod)
return objectOwnerMask;
//// Users should be able to edit what is over their land.
//ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
//if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod)
// return objectOwnerMask;
// Admin objects should not be editable by the above
if (IsAdministrator(objectOwner))
return objectEveryoneMask;
//// Admin objects should not be editable by the above
//if (IsAdministrator(objectOwner))
// return objectEveryoneMask;
// Estate users should be able to edit anything in the sim
if (IsEstateManager(user) && m_RegionOwnerIsGod)
@@ -467,6 +467,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (IsAdministrator(user))
return objectOwnerMask;
// Users should be able to edit what is over their land.
ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod)
{
uint responseMask = objectOwnerMask;
// Admin objects should not be editable by the above
if (IsAdministrator(objectOwner))
{
responseMask = objectEveryoneMask;
}
return responseMask;
}
return objectEveryoneMask;
}