diff options
author | Matt Lehmann | 2014-04-30 19:12:52 -0700 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-05-06 18:48:42 +0100 |
commit | 8b3c2f7d0c655d72bbca9dcbd092d3ab275d47c5 (patch) | |
tree | 9aa25b0d7e8956a93fa87da33dd479be92350b14 /OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |
parent | fix infinite recursion loop in SendGridInstantMessageViaXMLRPCAsync() (diff) | |
download | opensim-SC_OLD-8b3c2f7d0c655d72bbca9dcbd092d3ab275d47c5.zip opensim-SC_OLD-8b3c2f7d0c655d72bbca9dcbd092d3ab275d47c5.tar.gz opensim-SC_OLD-8b3c2f7d0c655d72bbca9dcbd092d3ab275d47c5.tar.bz2 opensim-SC_OLD-8b3c2f7d0c655d72bbca9dcbd092d3ab275d47c5.tar.xz |
updated version of default user switch for load oar :q :q
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index a1629fb..fe87350 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -160,10 +160,22 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
160 | private IAssetService m_assetService = null; | 160 | private IAssetService m_assetService = null; |
161 | 161 | ||
162 | 162 | ||
163 | private UUID m_defaultUser; | ||
164 | |||
163 | public ArchiveReadRequest(Scene scene, string loadPath, Guid requestId, Dictionary<string,object>options) | 165 | public ArchiveReadRequest(Scene scene, string loadPath, Guid requestId, Dictionary<string,object>options) |
164 | { | 166 | { |
165 | m_rootScene = scene; | 167 | m_rootScene = scene; |
166 | 168 | ||
169 | if (options.ContainsKey("default-user")) | ||
170 | { | ||
171 | m_defaultUser = (UUID)options["default-user"]; | ||
172 | m_log.InfoFormat("Using User {0} as default user", m_defaultUser.ToString()); | ||
173 | } | ||
174 | else | ||
175 | { | ||
176 | m_defaultUser = scene.RegionInfo.EstateSettings.EstateOwner; | ||
177 | } | ||
178 | |||
167 | m_loadPath = loadPath; | 179 | m_loadPath = loadPath; |
168 | try | 180 | try |
169 | { | 181 | { |
@@ -562,16 +574,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
562 | if (string.IsNullOrEmpty(part.CreatorData)) | 574 | if (string.IsNullOrEmpty(part.CreatorData)) |
563 | { | 575 | { |
564 | if (!ResolveUserUuid(scene, part.CreatorID)) | 576 | if (!ResolveUserUuid(scene, part.CreatorID)) |
565 | part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner; | 577 | part.CreatorID = m_defaultUser; |
566 | } | 578 | } |
567 | if (UserManager != null) | 579 | if (UserManager != null) |
568 | UserManager.AddUser(part.CreatorID, part.CreatorData); | 580 | UserManager.AddUser(part.CreatorID, part.CreatorData); |
569 | 581 | ||
570 | if (!(ResolveUserUuid(scene, part.OwnerID) || ResolveGroupUuid(part.OwnerID))) | 582 | if (!(ResolveUserUuid(scene, part.OwnerID) || ResolveGroupUuid(part.OwnerID))) |
571 | part.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner; | 583 | part.OwnerID = m_defaultUser; |
572 | 584 | ||
573 | if (!(ResolveUserUuid(scene, part.LastOwnerID) || ResolveGroupUuid(part.LastOwnerID))) | 585 | if (!(ResolveUserUuid(scene, part.LastOwnerID) || ResolveGroupUuid(part.LastOwnerID))) |
574 | part.LastOwnerID = scene.RegionInfo.EstateSettings.EstateOwner; | 586 | part.LastOwnerID = m_defaultUser; |
575 | 587 | ||
576 | if (!ResolveGroupUuid(part.GroupID)) | 588 | if (!ResolveGroupUuid(part.GroupID)) |
577 | part.GroupID = UUID.Zero; | 589 | part.GroupID = UUID.Zero; |
@@ -590,13 +602,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
590 | { | 602 | { |
591 | if (!(ResolveUserUuid(scene, kvp.Value.OwnerID) || ResolveGroupUuid(kvp.Value.OwnerID))) | 603 | if (!(ResolveUserUuid(scene, kvp.Value.OwnerID) || ResolveGroupUuid(kvp.Value.OwnerID))) |
592 | { | 604 | { |
593 | kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner; | 605 | kvp.Value.OwnerID = m_defaultUser; |
594 | } | 606 | } |
595 | 607 | ||
596 | if (string.IsNullOrEmpty(kvp.Value.CreatorData)) | 608 | if (string.IsNullOrEmpty(kvp.Value.CreatorData)) |
597 | { | 609 | { |
598 | if (!ResolveUserUuid(scene, kvp.Value.CreatorID)) | 610 | if (!ResolveUserUuid(scene, kvp.Value.CreatorID)) |
599 | kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner; | 611 | kvp.Value.CreatorID = m_defaultUser; |
600 | } | 612 | } |
601 | 613 | ||
602 | if (UserManager != null) | 614 | if (UserManager != null) |