Remove godmode for region owners+admins

From now on only possible for user level >= 200
This commit is contained in:
lickx
2025-05-23 10:23:15 +02:00
parent 333d837da6
commit 115887fc10
4 changed files with 4 additions and 65 deletions

View File

@@ -89,8 +89,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
private bool m_propagatePermissions = false;
private bool m_debugPermissions = false;
private bool m_allowGridAdmins = false;
private bool m_RegionOwnerIsAdmin = false;
private bool m_RegionManagerIsAdmin = false;
private bool m_forceGridAdminsOnly;
private bool m_forceAdminModeAlwaysOn;
private bool m_allowAdminActionsWithoutGodMode;
@@ -161,18 +159,11 @@ namespace OpenSim.Region.CoreModules.World.Permissions
string[] sections = new string[] { "Startup", "Permissions" };
m_allowGridAdmins = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods", sections, false);
m_allowGridAdmins = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods", sections, true);
m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions", sections, true);
m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions", sections, true);
m_forceGridAdminsOnly = Util.GetConfigVarFromSections<bool>(config, "force_grid_gods_only", sections, false);
if(!m_forceGridAdminsOnly)
{
m_RegionOwnerIsAdmin = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god",sections, false);
m_RegionManagerIsAdmin = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god",sections, false);
}
else
m_allowGridAdmins = true;
m_forceGridAdminsOnly = Util.GetConfigVarFromSections<bool>(config, "force_grid_gods_only", sections, true);
m_forceAdminModeAlwaysOn = Util.GetConfigVarFromSections<bool>(config, "automatic_gods", sections, false);
m_allowAdminActionsWithoutGodMode = Util.GetConfigVarFromSections<bool>(config, "implicit_gods", sections, false);
@@ -628,12 +619,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (user.IsZero())
return false;
if (m_RegionOwnerIsAdmin && m_scene.RegionInfo.EstateSettings.EstateOwner.Equals(user))
return true;
if (m_RegionManagerIsAdmin && IsEstateManager(user))
return true;
if (IsGridAdministrator(user))
return true;

View File

@@ -47,8 +47,6 @@ namespace OpenSim.Region.Framework.Scenes
Scene m_scene;
protected bool m_allowGridGods;
protected bool m_forceGridGodsOnly;
protected bool m_regionOwnerIsGod;
protected bool m_regionManagerIsGod;
protected bool m_forceGodModeAlwaysOn;
protected bool m_allowGodActionsWithoutGodMode;
@@ -76,29 +74,13 @@ namespace OpenSim.Region.Framework.Scenes
// gods are god everywhere.
m_allowGridGods =
Util.GetConfigVarFromSections<bool>(config,
"allow_grid_gods", sections, false);
"allow_grid_gods", sections, true);
// If grid gods are active, dont allow any other gods
m_forceGridGodsOnly =
Util.GetConfigVarFromSections<bool>(config,
"force_grid_gods_only", sections, false);
"force_grid_gods_only", sections, true);
if(!m_forceGridGodsOnly)
{
// The owner of a region is a god in his region only.
m_regionOwnerIsGod =
Util.GetConfigVarFromSections<bool>(config,
"region_owner_is_god", sections, false);
// Region managers are gods in the regions they manage.
m_regionManagerIsGod =
Util.GetConfigVarFromSections<bool>(config,
"region_manager_is_god", sections, false);
}
else
m_allowGridGods = true; // reduce potencial user mistakes
// God mode should be turned on in the viewer whenever
// the user has god rights somewhere. They may choose
// to turn it off again, though.
@@ -140,18 +122,6 @@ namespace OpenSim.Region.Framework.Scenes
if (m_allowGridGods && m_userLevel >= 200)
level = m_userLevel;
if(m_forceGridGodsOnly || level >= (int)ImplicitGodLevels.RegionOwner)
return level;
if (m_regionOwnerIsGod && m_scene.RegionInfo.EstateSettings.IsEstateOwner(m_scenePresence.UUID))
level = (int)ImplicitGodLevels.RegionOwner;
if(level >= (int)ImplicitGodLevels.EstateManager)
return level;
if (m_regionManagerIsGod && m_scene.Permissions.IsEstateManager(m_scenePresence.UUID))
level = (int)ImplicitGodLevels.EstateManager;
return level;
}

View File

@@ -491,16 +491,6 @@
;; if you don't trust grid admins, what are you doing there?
allow_grid_gods = true
;; This allows some control over permissions
;; please note that this still doesn't duplicate SL, and is not intended to
;# {region_owner_is_god} {} {Allow region owner gods} {true false} false
;; Allow region owners to assume god powers in their regions
; region_owner_is_god = false
;# {region_manager_is_god} {} {Allow region manager gods} {true false} false
;; Allow region managers to assume god powers in regions they manage
; region_manager_is_god = false
;# {simple_build_permissions} {} {Allow building in parcel by access list (no groups)} {true false} false
;; More control over permissions
;; This is definitely not SL!

View File

@@ -534,12 +534,6 @@
; if you don't trust grid admins, what are you doing there?
allow_grid_gods = true
; Allow region owners to assume god powers in their regions
;region_owner_is_god = false
; Allow region managers to assume god powers in regions they manage
;region_manager_is_god = false
; God mode should be turned on in the viewer whenever
; the user has god rights somewhere. They may choose
; to turn it off again, though.