mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
cleanups in inventory REST code. also, disables digest authentications
for inventory REST calls for the time being, as firefox, curl, and also python's urllib2 cannot authenticate using digest auth. fix permission checking for prim inventory to be the same as for normal edit ops.
This commit is contained in:
@@ -5200,6 +5200,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
}
|
||||
break;
|
||||
case PacketType.UpdateTaskInventory:
|
||||
m_log.DebugFormat("[AMW] UpdateTaskInventory request");
|
||||
UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
|
||||
if (OnUpdateTaskInventory != null)
|
||||
{
|
||||
@@ -5266,7 +5267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
break;
|
||||
|
||||
case PacketType.RezScript:
|
||||
|
||||
m_log.DebugFormat("[AMW] RezScript");
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
RezScriptPacket rezScriptx = (RezScriptPacket)Pack;
|
||||
|
||||
|
||||
@@ -1186,11 +1186,21 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
if (part != null)
|
||||
{
|
||||
if (part.OwnerID != remoteClient.AgentId)
|
||||
return;
|
||||
|
||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return;
|
||||
// replacing the following two checks with the
|
||||
// ExternalChecks.ExternalChecksCanEditObject(...)
|
||||
// call
|
||||
|
||||
// if (part.OwnerID != remoteClient.AgentId)
|
||||
// return;
|
||||
|
||||
// if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
// return;
|
||||
|
||||
if (!ExternalChecks.ExternalChecksCanEditObject(part.UUID, remoteClient.AgentId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TaskInventoryItem currentItem = part.GetInventoryItem(itemID);
|
||||
|
||||
@@ -1283,11 +1293,23 @@ System.Console.WriteLine("Item asset {0}, request asset {1}", prevItem.AssetID.T
|
||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
|
||||
/*
|
||||
if (part.OwnerID != remoteClient.AgentId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
if (!ExternalChecks.ExternalChecksCanEditObject(part.UUID, remoteClient.AgentId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID);
|
||||
// TODO: set this to "true" when scripts in inventory have persistent state to fire on_rez
|
||||
|
||||
Reference in New Issue
Block a user