Remove the restriction that you have to be logged in when loading/saving iars
This is pointless as we're supplying the password on the command lineviewer-2-initial-appearance
parent
387f743993
commit
b46de6e025
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Enable or disable checking whether the iar user is actually logged in
|
/// Enable or disable checking whether the iar user is actually logged in
|
||||||
/// </value>
|
/// </value>
|
||||||
public bool DisablePresenceChecks { get; set; }
|
// public bool DisablePresenceChecks { get; set; }
|
||||||
|
|
||||||
public event InventoryArchiveSaved OnInventoryArchiveSaved;
|
public event InventoryArchiveSaved OnInventoryArchiveSaved;
|
||||||
|
|
||||||
|
@ -95,10 +95,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
public InventoryArchiverModule() {}
|
public InventoryArchiverModule() {}
|
||||||
|
|
||||||
public InventoryArchiverModule(bool disablePresenceChecks)
|
// public InventoryArchiverModule(bool disablePresenceChecks)
|
||||||
{
|
// {
|
||||||
DisablePresenceChecks = disablePresenceChecks;
|
// DisablePresenceChecks = disablePresenceChecks;
|
||||||
}
|
// }
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(Scene scene, IConfigSource source)
|
||||||
{
|
{
|
||||||
|
@ -172,8 +172,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService);
|
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService);
|
||||||
|
@ -189,13 +189,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,8 +212,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService);
|
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService);
|
||||||
|
@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,9 +257,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
|
|
||||||
InventoryArchiveReadRequest request;
|
InventoryArchiveReadRequest request;
|
||||||
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
||||||
|
|
||||||
|
@ -280,13 +279,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_log.ErrorFormat("[INVENTORY ARCHIVER]: User {0} {1} not found",
|
m_log.ErrorFormat("[INVENTORY ARCHIVER]: User {0} {1} not found",
|
||||||
|
@ -306,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (CheckPresence(userInfo.PrincipalID))
|
// if (CheckPresence(userInfo.PrincipalID))
|
||||||
{
|
// {
|
||||||
InventoryArchiveReadRequest request;
|
InventoryArchiveReadRequest request;
|
||||||
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
|
||||||
|
|
||||||
|
@ -328,13 +327,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.ErrorFormat(
|
// m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
|
||||||
userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -529,28 +528,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// Check if the given user is present in any of the scenes.
|
// /// Check if the given user is present in any of the scenes.
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
/// <param name="userId">The user to check</param>
|
// /// <param name="userId">The user to check</param>
|
||||||
/// <returns>true if the user is in any of the scenes, false otherwise</returns>
|
// /// <returns>true if the user is in any of the scenes, false otherwise</returns>
|
||||||
protected bool CheckPresence(UUID userId)
|
// protected bool CheckPresence(UUID userId)
|
||||||
{
|
// {
|
||||||
if (DisablePresenceChecks)
|
// if (DisablePresenceChecks)
|
||||||
return true;
|
// return true;
|
||||||
|
//
|
||||||
foreach (Scene scene in m_scenes.Values)
|
// foreach (Scene scene in m_scenes.Values)
|
||||||
{
|
// {
|
||||||
ScenePresence p;
|
// ScenePresence p;
|
||||||
if ((p = scene.GetScenePresence(userId)) != null)
|
// if ((p = scene.GetScenePresence(userId)) != null)
|
||||||
{
|
// {
|
||||||
p.ControllingClient.SendAgentAlertMessage("Inventory operation has been started", false);
|
// p.ControllingClient.SendAgentAlertMessage("Inventory operation has been started", false);
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
TestHelper.InMethod();
|
TestHelper.InMethod();
|
||||||
// log4net.Config.XmlConfigurator.Configure();
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||||
|
@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
TestHelper.InMethod();
|
TestHelper.InMethod();
|
||||||
// log4net.Config.XmlConfigurator.Configure();
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||||
|
@ -355,7 +355,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
// log4net.Config.XmlConfigurator.Configure();
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
SerialiserModule serialiserModule = new SerialiserModule();
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
//log4net.Config.XmlConfigurator.Configure();
|
//log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
SerialiserModule serialiserModule = new SerialiserModule();
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||||
|
@ -443,7 +443,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
string humanEscapedItemName = @"You & you are a mean\/man\/";
|
string humanEscapedItemName = @"You & you are a mean\/man\/";
|
||||||
string userPassword = "meowfood";
|
string userPassword = "meowfood";
|
||||||
|
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||||
|
@ -558,7 +558,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
|
|
||||||
MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
||||||
SerialiserModule serialiserModule = new SerialiserModule();
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||||
|
@ -619,7 +619,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
|
|
||||||
// MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
// MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
||||||
// SerialiserModule serialiserModule = new SerialiserModule();
|
// SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
// InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
|
// InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||||
|
|
||||||
// // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
// // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||||
// Scene scene = SceneSetupHelpers.SetupScene();
|
// Scene scene = SceneSetupHelpers.SetupScene();
|
||||||
|
|
Loading…
Reference in New Issue