mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
* 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.
This commit is contained in:
@@ -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;
|
||||
@@ -361,4 +367,4 @@ namespace OpenSim.Region.Environment
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,11 +589,14 @@ 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 (group != null)
|
||||
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
||||
if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID)))
|
||||
{
|
||||
if (group != null)
|
||||
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -601,11 +604,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </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 (group != null)
|
||||
group.UpdateShape(shapeBlock, 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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user