From dfc553d0a4c25d6c1f491b228e89402c0415acda Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 15 Aug 2008 13:13:39 +0000 Subject: 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. --- .../Modules/World/Permissions/PermissionsModule.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Permissions') diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 0fbd4fb..6f72767 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -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; } -- cgit v1.1