* Fixed bug where 'taskOwnerId' would always be null in PermissionManager, hence always retuning false on GenericObjectPermission.
parent
dc5ab8b6c3
commit
dfda3dd4d7
|
@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment
|
||||||
return objectEveryoneMask;
|
return objectEveryoneMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool GenericObjectPermission(LLUUID user, LLUUID objId)
|
protected virtual bool GenericObjectPermission(LLUUID currentUser, LLUUID objId)
|
||||||
{
|
{
|
||||||
// Default: deny
|
// Default: deny
|
||||||
bool permission = false;
|
bool permission = false;
|
||||||
|
@ -256,32 +256,40 @@ namespace OpenSim.Region.Environment
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneObjectGroup task = (SceneObjectGroup) m_scene.Entities[objId];
|
SceneObjectGroup group = (SceneObjectGroup) m_scene.Entities[objId];
|
||||||
LLUUID taskOwner = null;
|
|
||||||
// Added this because at this point in time it wouldn't be wise for
|
LLUUID objectOwner = group.OwnerID;
|
||||||
// the administrator object permissions to take effect.
|
|
||||||
LLUUID objectOwner = task.OwnerID;
|
|
||||||
|
|
||||||
// Object owners should be able to edit their own content
|
// Object owners should be able to edit their own content
|
||||||
if (user == objectOwner)
|
if (currentUser == objectOwner)
|
||||||
|
{
|
||||||
permission = true;
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Users should be able to edit what is over their land.
|
// Users should be able to edit what is over their land.
|
||||||
Land parcel = m_scene.LandManager.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
|
Land parcel = m_scene.LandManager.getLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
|
||||||
if (parcel != null && parcel.landData.ownerID == user)
|
if ((parcel != null) && ( parcel.landData.ownerID == currentUser))
|
||||||
|
{
|
||||||
permission = true;
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Estate users should be able to edit anything in the sim
|
// Estate users should be able to edit anything in the sim
|
||||||
if (IsEstateManager(user))
|
if (IsEstateManager(currentUser))
|
||||||
|
{
|
||||||
permission = true;
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Admin objects should not be editable by the above
|
// Admin objects should not be editable by the above
|
||||||
if (IsAdministrator(taskOwner))
|
if (IsAdministrator(objectOwner))
|
||||||
|
{
|
||||||
permission = false;
|
permission = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Admin should be able to edit anything in the sim (including admin objects)
|
// Admin should be able to edit anything in the sim (including admin objects)
|
||||||
if (IsAdministrator(user))
|
if (IsAdministrator(currentUser))
|
||||||
|
{
|
||||||
permission = true;
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1573,11 +1573,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SendFullUpdateToClient(remoteClient, lPos, clientflags);
|
SendFullUpdateToClient(remoteClient, lPos, clientflags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="remoteClient"></param>
|
|
||||||
/// <param name="lPos"></param>
|
|
||||||
public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags)
|
public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags)
|
||||||
{
|
{
|
||||||
LLQuaternion lRot;
|
LLQuaternion lRot;
|
||||||
|
|
Loading…
Reference in New Issue