Refactor: Scene.ExternalChecks -> Scene.Permissions. Also make all

the internals of the permissions module adapter sane
This commit is contained in:
Melanie Thielker
2008-11-21 22:14:57 +00:00
parent c0cd681608
commit ba723a4cf6
21 changed files with 436 additions and 436 deletions

View File

@@ -5111,7 +5111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
if (m_host.ObjectOwner == parcel.landData.OwnerID ||
(m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID
&& parcel.landData.IsGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
&& parcel.landData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID))
{
av.StandUp();
}
@@ -7408,7 +7408,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (config.Configs["XEngine"].GetBoolean("AllowGodFunctions", false))
{
if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID))
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
{
if (mask == ScriptBaseClass.MASK_BASE)//0
{
@@ -7701,7 +7701,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// according to the docs, this command only works if script owner and land owner are the same
// lets add estate owners and gods, too, and use the generic permission check.
ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
if (!World.ExternalChecks.ExternalChecksCanEditParcel(m_host.ObjectOwner, landObject)) return;
if (!World.Permissions.CanEditParcel(m_host.ObjectOwner, landObject)) return;
bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?

View File

@@ -276,7 +276,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (x > 255 || x < 0 || y > 255 || y < 0)
OSSLError("osTerrainSetHeight: Coordinate out of bounds");
if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
{
World.Heightmap[x, y] = val;
return 1;
@@ -309,7 +309,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.High, "osRegionRestart");
m_host.AddScriptLPS(1);
if (World.ExternalChecks.ExternalChecksCanIssueEstateCommand(m_host.OwnerID, false))
if (World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
{
World.Restart((float)seconds);
return 1;
@@ -461,7 +461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID))
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
{
MainConsole.Instance.RunCommand(command);
return true;
@@ -663,7 +663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
//Check to make sure that the script's owner is the estate manager/master
//World.Permissions.GenericEstatePermission(
if (World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
if (World.Permissions.IsGod(m_host.OwnerID))
{
World.EventManager.TriggerRequestChangeWaterHeight((float)height);
}