Merge branch 'master' into careminster
commit
24a49011cb
|
@ -677,18 +677,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
bool permission = false;
|
bool permission = false;
|
||||||
bool locked = false;
|
bool locked = false;
|
||||||
|
|
||||||
if (!m_scene.Entities.ContainsKey(objId))
|
SceneObjectPart part = m_scene.GetSceneObjectPart(objId);
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If it's not an object, we cant edit it.
|
if (part == null)
|
||||||
if ((!(m_scene.Entities[objId] is SceneObjectGroup)))
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId];
|
SceneObjectGroup group = part.ParentGroup;
|
||||||
|
|
||||||
UUID objectOwner = group.OwnerID;
|
UUID objectOwner = group.OwnerID;
|
||||||
locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
|
locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
|
||||||
|
@ -977,16 +971,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
|
|
||||||
|
|
||||||
// If we selected a sub-prim to edit, the objectID won't represent the object, but only a part.
|
|
||||||
// We have to check the permissions of the group, though.
|
|
||||||
if (part.ParentID != 0)
|
|
||||||
{
|
|
||||||
objectID = part.ParentUUID;
|
|
||||||
part = m_scene.GetSceneObjectPart(objectID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return GenericObjectPermission(editorID, objectID, false);
|
return GenericObjectPermission(editorID, objectID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1151,34 +1151,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UUID partUUID = part.UUID;
|
|
||||||
SceneObjectGroup group = part.ParentGroup;
|
|
||||||
if (group != null)
|
|
||||||
partUUID = group.RootPart.UUID;
|
|
||||||
|
|
||||||
TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);
|
TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);
|
||||||
|
|
||||||
if (null == taskItem)
|
|
||||||
{
|
|
||||||
m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed"
|
|
||||||
+ " because the inventory item could not be found",
|
|
||||||
itemId, primLocalId);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||||
{
|
{
|
||||||
// If the item to be moved is no copy, we need to be able to
|
// If the item to be moved is no copy, we need to be able to
|
||||||
// edit the prim.
|
// edit the prim.
|
||||||
if (!Permissions.CanEditObjectInventory(partUUID, remoteClient.AgentId))
|
if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If the item is copiable, then we just need to have perms
|
// If the item is copiable, then we just need to have perms
|
||||||
// on it. The delete check is a pure rights check
|
// on it. The delete check is a pure rights check
|
||||||
if (!Permissions.CanDeleteObject(partUUID, remoteClient.AgentId))
|
if (!Permissions.CanDeleteObject(part.UUID, remoteClient.AgentId))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue