* Thanks to _SomeOne_, Server side permissions on object editing. Be aware, that if you're editing an object on your client that you're not allowed to, it'll appear that it's moving to you, but won't actually be moving on the sim.
parent
0619451ea6
commit
4bd38fc65a
|
@ -211,9 +211,9 @@ namespace OpenSim.Framework
|
|||
|
||||
public delegate void GenericCall7(uint localID, string message);
|
||||
|
||||
public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
|
||||
public delegate void UpdateShape(LLUUID agentID, uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
|
||||
|
||||
public delegate void ObjectExtraParams(uint localID, ushort type, bool inUse, byte[] data);
|
||||
public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data);
|
||||
|
||||
public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
|
||||
|
||||
|
|
|
@ -2014,7 +2014,11 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket) packet;
|
||||
// System.Console.WriteLine("new multi update packet " + multipleupdate.ToString());
|
||||
OpenSim.Region.Environment.Scenes.Scene tScene = (OpenSim.Region.Environment.Scenes.Scene)this.m_scene;
|
||||
|
||||
for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
|
||||
{
|
||||
if (tScene.PermissionsMngr.CanEditObject(simClient.AgentId, tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID))
|
||||
{
|
||||
#region position
|
||||
|
||||
|
@ -2125,6 +2129,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2757,7 +2762,7 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
if (OnUpdatePrimShape != null)
|
||||
{
|
||||
OnUpdatePrimShape(shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]);
|
||||
OnUpdatePrimShape(this.m_agentId, shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2765,7 +2770,7 @@ namespace OpenSim.Region.ClientStack
|
|||
ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket) Pack;
|
||||
if (OnUpdateExtraParams != null)
|
||||
{
|
||||
OnUpdateExtraParams(extraPar.ObjectData[0].ObjectLocalID, extraPar.ObjectData[0].ParamType,
|
||||
OnUpdateExtraParams(this.m_agentId, extraPar.ObjectData[0].ObjectLocalID, extraPar.ObjectData[0].ParamType,
|
||||
extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -103,6 +103,12 @@ namespace OpenSim.Region.Environment
|
|||
|
||||
string reason = "Insufficient permission";
|
||||
|
||||
Land land = this.m_scene.LandManager.getLandObject(position.X, position.Y);
|
||||
if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) == (int)Parcel.ParcelFlags.CreateObjects)
|
||||
permission = true;
|
||||
|
||||
//TODO: check for group rights
|
||||
|
||||
if (IsAdministrator(user))
|
||||
{
|
||||
permission = true;
|
||||
|
|
|
@ -589,24 +589,30 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
group.SetPartDescription(description, primLocalID);
|
||||
}
|
||||
|
||||
public void UpdateExtraParam(uint primLocalID, ushort type, bool inUse, byte[] data)
|
||||
public void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||
if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID)))
|
||||
{
|
||||
if (group != null)
|
||||
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="primLocalID"></param>
|
||||
/// <param name="shapeBlock"></param>
|
||||
public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
|
||||
public void UpdatePrimShape(LLUUID agentID, uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||
if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID)))
|
||||
{
|
||||
if (group != null)
|
||||
group.UpdateShape(shapeBlock, primLocalID);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -753,3 +759,4 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue