aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorOren Hurvitz2014-04-16 11:43:30 +0300
committerOren Hurvitz2014-04-20 06:23:35 +0100
commita780e01a544e13cc0326ad92ca7927b2443e5ce4 (patch)
tree55e84ea91ed7182876df10e3bfb445e3e8e59a5d
parentCatch empty url error (diff)
downloadopensim-SC_OLD-a780e01a544e13cc0326ad92ca7927b2443e5ce4.zip
opensim-SC_OLD-a780e01a544e13cc0326ad92ca7927b2443e5ce4.tar.gz
opensim-SC_OLD-a780e01a544e13cc0326ad92ca7927b2443e5ce4.tar.bz2
opensim-SC_OLD-a780e01a544e13cc0326ad92ca7927b2443e5ce4.tar.xz
Fixed: the parcel flag "Allow Scripts from Group" should only check if the parcel has a Group set; it doesn't have to be *deeded* to the group
Also some cleanup of the use of Group ID's (with no change to functionality).
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs27
4 files changed, 25 insertions, 31 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 54715a8..a1629fb 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -633,12 +633,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
633 633
634 // Validate User and Group UUID's 634 // Validate User and Group UUID's
635 635
636 if (!ResolveGroupUuid(parcel.GroupID))
637 parcel.GroupID = UUID.Zero;
638
636 if (parcel.IsGroupOwned) 639 if (parcel.IsGroupOwned)
637 { 640 {
638 if (!ResolveGroupUuid(parcel.GroupID)) 641 if (parcel.GroupID != UUID.Zero)
642 {
643 // In group-owned parcels, OwnerID=GroupID. This should already be the case, but let's make sure.
644 parcel.OwnerID = parcel.GroupID;
645 }
646 else
639 { 647 {
640 parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; 648 parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
641 parcel.GroupID = UUID.Zero;
642 parcel.IsGroupOwned = false; 649 parcel.IsGroupOwned = false;
643 } 650 }
644 } 651 }
@@ -646,9 +653,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
646 { 653 {
647 if (!ResolveUserUuid(scene, parcel.OwnerID)) 654 if (!ResolveUserUuid(scene, parcel.OwnerID))
648 parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; 655 parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
649
650 if (!ResolveGroupUuid(parcel.GroupID))
651 parcel.GroupID = UUID.Zero;
652 } 656 }
653 657
654 List<LandAccessEntry> accessList = new List<LandAccessEntry>(); 658 List<LandAccessEntry> accessList = new List<LandAccessEntry>();
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 0ecf13b..5ab97ff 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1543,8 +1543,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1543 1543
1544 private void IncomingLandObjectFromStorage(LandData data) 1544 private void IncomingLandObjectFromStorage(LandData data)
1545 { 1545 {
1546 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); 1546 ILandObject new_land = new LandObject(data, m_scene);
1547 new_land.LandData = data.Copy();
1548 new_land.SetLandBitmapFromByteArray(); 1547 new_land.SetLandBitmapFromByteArray();
1549 AddLandObject(new_land); 1548 AddLandObject(new_land);
1550 } 1549 }
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index af19ca3..57fa4d9 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -120,6 +120,12 @@ namespace OpenSim.Region.CoreModules.World.Land
120 120
121 #region Constructors 121 #region Constructors
122 122
123 public LandObject(LandData landData, Scene scene)
124 {
125 LandData = landData.Copy();
126 m_scene = scene;
127 }
128
123 public LandObject(UUID owner_id, bool is_group_owned, Scene scene) 129 public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
124 { 130 {
125 m_scene = scene; 131 m_scene = scene;
@@ -163,12 +169,8 @@ namespace OpenSim.Region.CoreModules.World.Land
163 169
164 public ILandObject Copy() 170 public ILandObject Copy()
165 { 171 {
166 ILandObject newLand = new LandObject(LandData.OwnerID, LandData.IsGroupOwned, m_scene); 172 ILandObject newLand = new LandObject(LandData, m_scene);
167
168 //Place all new variables here!
169 newLand.LandBitmap = (bool[,]) (LandBitmap.Clone()); 173 newLand.LandBitmap = (bool[,]) (LandBitmap.Clone());
170 newLand.LandData = LandData.Copy();
171
172 return newLand; 174 return newLand;
173 } 175 }
174 176
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2ccb28d..e6887b4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4516,29 +4516,18 @@ namespace OpenSim.Region.Framework.Scenes
4516 { 4516 {
4517 return true; 4517 return true;
4518 } 4518 }
4519 else if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0) 4519 else if ((part.OwnerID == parcel.LandData.OwnerID) || Permissions.IsGod(part.OwnerID))
4520 { 4520 {
4521 if (part.OwnerID == parcel.LandData.OwnerID 4521 return true;
4522 || (parcel.LandData.IsGroupOwned && part.GroupID == parcel.LandData.GroupID) 4522 }
4523 || Permissions.IsGod(part.OwnerID)) 4523 else if (((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0)
4524 { 4524 && (parcel.LandData.GroupID != UUID.Zero) && (parcel.LandData.GroupID == part.GroupID))
4525 return true; 4525 {
4526 } 4526 return true;
4527 else
4528 {
4529 return false;
4530 }
4531 } 4527 }
4532 else 4528 else
4533 { 4529 {
4534 if (part.OwnerID == parcel.LandData.OwnerID) 4530 return false;
4535 {
4536 return true;
4537 }
4538 else
4539 {
4540 return false;
4541 }
4542 } 4531 }
4543 } 4532 }
4544 else 4533 else