Remove godmode for region owners+admins
From now on only possible for user level >= 200
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user