mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
do not allow estate bans to grid admins
This commit is contained in:
@@ -410,8 +410,7 @@ namespace OpenSim.Framework
|
||||
{
|
||||
if (ban is null)
|
||||
return;
|
||||
if (!IsBanned(ban.BannedUserID, 32) &&
|
||||
(l_EstateBans.Count < (int)Constants.EstateAccessLimits.EstateBans)) //Ignore age-based bans
|
||||
if (!IsBanned(ban.BannedUserID, 32) && (l_EstateBans.Count < (int)Constants.EstateAccessLimits.EstateBans)) //Ignore age-based bans
|
||||
l_EstateBans.Add(ban);
|
||||
}
|
||||
|
||||
|
||||
@@ -2769,11 +2769,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
// If the user is banned, we won't let any of their objects
|
||||
// enter. Period.
|
||||
if (m_sceneRegionInfo.EstateSettings.IsBanned(so.OwnerID))
|
||||
if (!m_scene.Permissions.IsAdministrator(so.OwnerID) && m_sceneRegionInfo.EstateSettings.IsBanned(so.OwnerID))
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Denied {0} {1} into {2} of banned owner {3}",
|
||||
so.Name, so.UUID, m_sceneName, so.OwnerID);
|
||||
m_log.Debug(
|
||||
$"[ENTITY TRANSFER MODULE]: Denied {so.Name} {so.UUID} into { m_sceneName} of banned owner {so.OwnerID}");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2781,9 +2780,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
{
|
||||
if(m_scene.GetScenePresence(so.OwnerID) == null)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Denied attachment {0}({1}) owner {2} not in region {3}",
|
||||
so.Name, so.UUID, so.OwnerID, m_sceneName);
|
||||
m_log.Debug(
|
||||
$"[ENTITY TRANSFER MODULE]: Denied attachment {so.Name}({so.UUID}) owner {so.OwnerID} not in region {m_sceneName}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
|
||||
return true;
|
||||
}
|
||||
|
||||
UUID userID = new UUID(user);
|
||||
if(!UUID.TryParse(user, out UUID userID ))
|
||||
{
|
||||
message = "Invalid UUID";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_Scene.Permissions.IsAdministrator(userID))
|
||||
{
|
||||
message = "Authorized";
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((m_accessValue & AccessFlags.DisallowForeigners) != 0)
|
||||
{
|
||||
@@ -117,7 +127,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
|
||||
|
||||
if ((m_accessValue & AccessFlags.DisallowResidents) != 0)
|
||||
{
|
||||
if (!(m_Scene.Permissions.IsGod(userID) || m_Scene.Permissions.IsAdministrator(userID)))
|
||||
if(!m_Scene.Permissions.IsEstateManager(userID))
|
||||
{
|
||||
message = "Only Admins and Managers allowed in this region";
|
||||
return false;
|
||||
|
||||
@@ -972,8 +972,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
|
||||
if ((estateAccessType & 64) != 0) // Ban add
|
||||
{
|
||||
|
||||
if(thisSettings.EstateBansCount() >= (int)Constants.EstateAccessLimits.EstateBans)
|
||||
bool userIsAdmin = Scene.Permissions.IsAdministrator(user);
|
||||
if(userIsAdmin)
|
||||
{
|
||||
remote_client.SendAlertMessage("Cannot ban a Administrator");
|
||||
}
|
||||
else if(thisSettings.EstateBansCount() >= (int)Constants.EstateAccessLimits.EstateBans)
|
||||
{
|
||||
if(!sentBansFull)
|
||||
{
|
||||
|
||||
@@ -17361,6 +17361,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
break;
|
||||
case ScriptBaseClass.ESTATE_ACCESS_BANNED_AGENT_ADD:
|
||||
if (!isAccount) return 0;
|
||||
if(World.Permissions.IsAdministrator(id)) return 0;
|
||||
if (estate.IsBanned(id, World.GetUserFlags(id))) return 1;
|
||||
EstateBan ban = new()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user