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).
0.8.0.3
Oren Hurvitz 2014-04-16 11:43:30 +03:00
parent 63fd027494
commit a780e01a54
4 changed files with 25 additions and 31 deletions

View File

@ -633,12 +633,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// Validate User and Group UUID's
if (!ResolveGroupUuid(parcel.GroupID))
parcel.GroupID = UUID.Zero;
if (parcel.IsGroupOwned)
{
if (!ResolveGroupUuid(parcel.GroupID))
if (parcel.GroupID != UUID.Zero)
{
// In group-owned parcels, OwnerID=GroupID. This should already be the case, but let's make sure.
parcel.OwnerID = parcel.GroupID;
}
else
{
parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
parcel.GroupID = UUID.Zero;
parcel.IsGroupOwned = false;
}
}
@ -646,9 +653,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{
if (!ResolveUserUuid(scene, parcel.OwnerID))
parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
if (!ResolveGroupUuid(parcel.GroupID))
parcel.GroupID = UUID.Zero;
}
List<LandAccessEntry> accessList = new List<LandAccessEntry>();

View File

@ -1543,8 +1543,7 @@ namespace OpenSim.Region.CoreModules.World.Land
private void IncomingLandObjectFromStorage(LandData data)
{
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
new_land.LandData = data.Copy();
ILandObject new_land = new LandObject(data, m_scene);
new_land.SetLandBitmapFromByteArray();
AddLandObject(new_land);
}

View File

@ -120,6 +120,12 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Constructors
public LandObject(LandData landData, Scene scene)
{
LandData = landData.Copy();
m_scene = scene;
}
public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
{
m_scene = scene;
@ -163,12 +169,8 @@ namespace OpenSim.Region.CoreModules.World.Land
public ILandObject Copy()
{
ILandObject newLand = new LandObject(LandData.OwnerID, LandData.IsGroupOwned, m_scene);
//Place all new variables here!
ILandObject newLand = new LandObject(LandData, m_scene);
newLand.LandBitmap = (bool[,]) (LandBitmap.Clone());
newLand.LandData = LandData.Copy();
return newLand;
}

View File

@ -4516,29 +4516,18 @@ namespace OpenSim.Region.Framework.Scenes
{
return true;
}
else if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0)
else if ((part.OwnerID == parcel.LandData.OwnerID) || Permissions.IsGod(part.OwnerID))
{
if (part.OwnerID == parcel.LandData.OwnerID
|| (parcel.LandData.IsGroupOwned && part.GroupID == parcel.LandData.GroupID)
|| Permissions.IsGod(part.OwnerID))
{
return true;
}
else
{
return false;
}
return true;
}
else if (((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0)
&& (parcel.LandData.GroupID != UUID.Zero) && (parcel.LandData.GroupID == part.GroupID))
{
return true;
}
else
{
if (part.OwnerID == parcel.LandData.OwnerID)
{
return true;
}
else
{
return false;
}
return false;
}
}
else