mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Fix up master avatar handling for estate owners. Introduces a new
hierarchical rights structure. MasterAvatar: Owner of the region server (may be null), net gods (users with GodLevel 200), Estate owner (from database). Look at Opensim.ini.example to enable net gods. Estate owner will default to master avatar.
This commit is contained in:
@@ -137,6 +137,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
|
||||
// otherwise, use the master avatar uuid instead
|
||||
LLUUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
|
||||
masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
foreach (SceneObjectPart part in sceneObject.Children.Values)
|
||||
{
|
||||
if (!resolveUserUuid(part.CreatorID))
|
||||
|
||||
@@ -212,6 +212,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
||||
{
|
||||
// EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc.
|
||||
|
||||
if (user == m_scene.RegionInfo.EstateSettings.EstateOwner)
|
||||
return; // never process EO
|
||||
if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID)
|
||||
return; // never process owner
|
||||
|
||||
@@ -557,7 +559,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
||||
|
||||
args.regionFlags = GetRegionFlags();
|
||||
args.regionName = m_scene.RegionInfo.RegionName;
|
||||
args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
|
||||
args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
else
|
||||
args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
args.terrainBase0 = LLUUID.Zero;
|
||||
args.terrainBase1 = LLUUID.Zero;
|
||||
args.terrainBase2 = LLUUID.Zero;
|
||||
@@ -811,6 +816,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
||||
{
|
||||
if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID)
|
||||
return true;
|
||||
if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner)
|
||||
return true;
|
||||
|
||||
List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers);
|
||||
if (ems.Contains(avatarID))
|
||||
|
||||
@@ -162,7 +162,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||
ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene);
|
||||
|
||||
fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
|
||||
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
if(m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
|
||||
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
else
|
||||
fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
fullSimParcel.landData.ClaimDate = Util.UnixTimeSinceEpoch();
|
||||
AddLandObject(fullSimParcel);
|
||||
}
|
||||
@@ -931,7 +934,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id]))
|
||||
{
|
||||
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
if(m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
|
||||
landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
else
|
||||
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
m_scene.Broadcast(SendParcelOverlay);
|
||||
landList[local_id].sendLandUpdateToClient(remote_client);
|
||||
}
|
||||
@@ -945,7 +951,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id]))
|
||||
{
|
||||
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
if(m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
|
||||
landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
else
|
||||
landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
landList[local_id].landData.ClaimDate = Util.UnixTimeSinceEpoch();
|
||||
m_scene.Broadcast(SendParcelOverlay);
|
||||
landList[local_id].sendLandUpdateToClient(remote_client);
|
||||
|
||||
@@ -32,6 +32,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Modules.Framework;
|
||||
using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander;
|
||||
@@ -63,6 +64,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||
private bool m_bypassPermissions = false;
|
||||
private bool m_bypassPermissionsValue = true;
|
||||
private bool m_debugPermissions = false;
|
||||
private bool m_allowGridGods = false;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -136,6 +138,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||
if (!modules.Contains("DefaultPermissionsModule"))
|
||||
return;
|
||||
|
||||
m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false);
|
||||
|
||||
m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
|
||||
|
||||
if (m_bypassPermissions)
|
||||
@@ -231,11 +235,6 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||
|
||||
protected bool IsAdministrator(LLUUID user)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[PERMISSIONS]: Is adminstrator called for {0} where region master avatar is {1}",
|
||||
// user, m_scene.RegionInfo.MasterAvatarAssignedUUID);
|
||||
|
||||
// If there is no master avatar, return false
|
||||
if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero)
|
||||
{
|
||||
if (m_scene.RegionInfo.MasterAvatarAssignedUUID == user)
|
||||
@@ -246,7 +245,9 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner == user)
|
||||
return true;
|
||||
}
|
||||
|
||||
UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(user);
|
||||
if((userProfile.GodLevel) >= 200 && m_allowGridGods)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user