diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index a1629fb..e9c6fb6 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 | { |
@@ -206,6 +218,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
206 | m_merge = options.ContainsKey("merge"); | 218 | m_merge = options.ContainsKey("merge"); |
207 | m_requestId = requestId; | 219 | m_requestId = requestId; |
208 | 220 | ||
221 | m_defaultUser = scene.RegionInfo.EstateSettings.EstateOwner; | ||
222 | |||
209 | // Zero can never be a valid user id | 223 | // Zero can never be a valid user id |
210 | m_validUserUuids[UUID.Zero] = false; | 224 | m_validUserUuids[UUID.Zero] = false; |
211 | 225 | ||
@@ -562,16 +576,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
562 | if (string.IsNullOrEmpty(part.CreatorData)) | 576 | if (string.IsNullOrEmpty(part.CreatorData)) |
563 | { | 577 | { |
564 | if (!ResolveUserUuid(scene, part.CreatorID)) | 578 | if (!ResolveUserUuid(scene, part.CreatorID)) |
565 | part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner; | 579 | part.CreatorID = m_defaultUser; |
566 | } | 580 | } |
567 | if (UserManager != null) | 581 | if (UserManager != null) |
568 | UserManager.AddUser(part.CreatorID, part.CreatorData); | 582 | UserManager.AddUser(part.CreatorID, part.CreatorData); |
569 | 583 | ||
570 | if (!(ResolveUserUuid(scene, part.OwnerID) || ResolveGroupUuid(part.OwnerID))) | 584 | if (!(ResolveUserUuid(scene, part.OwnerID) || ResolveGroupUuid(part.OwnerID))) |
571 | part.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner; | 585 | part.OwnerID = m_defaultUser; |
572 | 586 | ||
573 | if (!(ResolveUserUuid(scene, part.LastOwnerID) || ResolveGroupUuid(part.LastOwnerID))) | 587 | if (!(ResolveUserUuid(scene, part.LastOwnerID) || ResolveGroupUuid(part.LastOwnerID))) |
574 | part.LastOwnerID = scene.RegionInfo.EstateSettings.EstateOwner; | 588 | part.LastOwnerID = m_defaultUser; |
575 | 589 | ||
576 | if (!ResolveGroupUuid(part.GroupID)) | 590 | if (!ResolveGroupUuid(part.GroupID)) |
577 | part.GroupID = UUID.Zero; | 591 | part.GroupID = UUID.Zero; |
@@ -590,13 +604,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
590 | { | 604 | { |
591 | if (!(ResolveUserUuid(scene, kvp.Value.OwnerID) || ResolveGroupUuid(kvp.Value.OwnerID))) | 605 | if (!(ResolveUserUuid(scene, kvp.Value.OwnerID) || ResolveGroupUuid(kvp.Value.OwnerID))) |
592 | { | 606 | { |
593 | kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner; | 607 | kvp.Value.OwnerID = m_defaultUser; |
594 | } | 608 | } |
595 | 609 | ||
596 | if (string.IsNullOrEmpty(kvp.Value.CreatorData)) | 610 | if (string.IsNullOrEmpty(kvp.Value.CreatorData)) |
597 | { | 611 | { |
598 | if (!ResolveUserUuid(scene, kvp.Value.CreatorID)) | 612 | if (!ResolveUserUuid(scene, kvp.Value.CreatorID)) |
599 | kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner; | 613 | kvp.Value.CreatorID = m_defaultUser; |
600 | } | 614 | } |
601 | 615 | ||
602 | if (UserManager != null) | 616 | if (UserManager != null) |