Refactor: Scene.ExternalChecks -> Scene.Permissions. Also make all
the internals of the permissions module adapter sane0.6.1-post-fixes
parent
c0cd681608
commit
ba723a4cf6
|
@ -1095,7 +1095,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
string fromName, byte dialog, uint timeStamp,
|
||||
UUID transactionID, bool fromGroup, byte[] binaryBucket)
|
||||
{
|
||||
if (((Scene)(m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent))
|
||||
if (((Scene)(m_scene)).Permissions.CanInstantMessage(fromAgent, toAgent))
|
||||
{
|
||||
ImprovedInstantMessagePacket msg
|
||||
= (ImprovedInstantMessagePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedInstantMessage);
|
||||
|
@ -4984,7 +4984,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
UUID taskID = new UUID(transfer.TransferInfo.Params, 48);
|
||||
UUID itemID = new UUID(transfer.TransferInfo.Params, 64);
|
||||
UUID requestID = new UUID(transfer.TransferInfo.Params, 80);
|
||||
if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions()))
|
||||
if (!(((Scene)m_scene).Permissions.BypassPermissions()))
|
||||
{
|
||||
if (taskID != UUID.Zero) // Prim
|
||||
{
|
||||
|
@ -5040,7 +5040,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
//
|
||||
if (assetRequestItem.AssetType == 10)
|
||||
{
|
||||
if (!((Scene)m_scene).ExternalChecks.ExternalChecksCanViewScript(itemID, UUID.Zero, AgentId))
|
||||
if (!((Scene)m_scene).Permissions.CanViewScript(itemID, UUID.Zero, AgentId))
|
||||
{
|
||||
SendAgentAlertMessage("Insufficient permissions to view script", false);
|
||||
break;
|
||||
|
@ -5048,7 +5048,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
else if (assetRequestItem.AssetType == 7)
|
||||
{
|
||||
if (!((Scene)m_scene).ExternalChecks.ExternalChecksCanViewNotecard(itemID, UUID.Zero, AgentId))
|
||||
if (!((Scene)m_scene).Permissions.CanViewNotecard(itemID, UUID.Zero, AgentId))
|
||||
{
|
||||
SendAgentAlertMessage("Insufficient permissions to view notecard", false);
|
||||
break;
|
||||
|
@ -5799,13 +5799,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
switch (Utils.BytesToString(messagePacket.MethodData.Method))
|
||||
{
|
||||
case "getinfo":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
OnDetailedEstateDataRequest(this, messagePacket.MethodData.Invoice);
|
||||
}
|
||||
break;
|
||||
case "setregioninfo":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
|
||||
convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
|
||||
|
@ -5818,7 +5818,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
break;
|
||||
// case "texturebase":
|
||||
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
// if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
// {
|
||||
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||
// {
|
||||
|
@ -5833,7 +5833,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// }
|
||||
// break;
|
||||
case "texturedetail":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||
{
|
||||
|
@ -5851,7 +5851,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
break;
|
||||
case "textureheights":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||
{
|
||||
|
@ -5872,7 +5872,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
OnCommitEstateTerrainTextureRequest(this);
|
||||
break;
|
||||
case "setregionterrain":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
if (messagePacket.ParamList.Length != 9)
|
||||
{
|
||||
|
@ -5910,7 +5910,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
break;
|
||||
case "restart":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
// There's only 1 block in the estateResetSim.. and that's the number of seconds till restart.
|
||||
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||
|
@ -5924,7 +5924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "estatechangecovenantid":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||
{
|
||||
|
@ -5934,7 +5934,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "estateaccessdelta": // Estate access delta manages the banlist and allow list too.
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
|
||||
OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
|
||||
|
@ -5942,7 +5942,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "simulatormessage":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
UUID invoice = messagePacket.MethodData.Invoice;
|
||||
UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
|
||||
|
@ -5953,7 +5953,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "instantmessage":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
if (messagePacket.ParamList.Length < 5)
|
||||
break;
|
||||
|
@ -5966,7 +5966,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "setregiondebug":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
UUID invoice = messagePacket.MethodData.Invoice;
|
||||
UUID SenderID = messagePacket.AgentData.AgentID;
|
||||
|
@ -5978,7 +5978,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "teleporthomeuser":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
UUID invoice = messagePacket.MethodData.Invoice;
|
||||
UUID SenderID = messagePacket.AgentData.AgentID;
|
||||
|
@ -5990,7 +5990,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "teleporthomeallusers":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
UUID invoice = messagePacket.MethodData.Invoice;
|
||||
UUID SenderID = messagePacket.AgentData.AgentID;
|
||||
|
@ -6012,7 +6012,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
break;
|
||||
case "terrain":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
if (messagePacket.ParamList.Length > 0)
|
||||
{
|
||||
|
@ -6054,7 +6054,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
break;
|
||||
|
||||
case "estatechangeinfo":
|
||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||
if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
|
||||
{
|
||||
UUID invoice = messagePacket.MethodData.Invoice;
|
||||
UUID SenderID = messagePacket.AgentData.AgentID;
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
else
|
||||
estateOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanBeGodLike(remote_client.AgentId))
|
||||
if (m_scene.Permissions.IsGod(remote_client.AgentId))
|
||||
estateOwner = remote_client.AgentId;
|
||||
|
||||
remote_client.SendDetailedEstateData(invoice,
|
||||
|
@ -233,7 +233,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
switch (estateAccessType)
|
||||
{
|
||||
case 64:
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, false) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
|
||||
{
|
||||
EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
|
||||
|
||||
|
@ -285,7 +285,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
}
|
||||
break;
|
||||
case 128:
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, false) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
|
||||
{
|
||||
EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
|
||||
|
||||
|
@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
break;
|
||||
case 256:
|
||||
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, true) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
|
||||
{
|
||||
m_scene.RegionInfo.EstateSettings.AddEstateManager(user);
|
||||
m_scene.RegionInfo.EstateSettings.Save();
|
||||
|
@ -334,7 +334,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
|
||||
break;
|
||||
case 512:
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, true) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
|
||||
{
|
||||
m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
|
||||
m_scene.RegionInfo.EstateSettings.Save();
|
||||
|
@ -742,7 +742,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||
|
||||
// Fudge estate owner
|
||||
//if (m_scene.ExternalChecks.ExternalChecksCanBeGodLike(remoteClient.AgentId))
|
||||
//if (m_scene.Permissions.IsGod(remoteClient.AgentId))
|
||||
// args.SimOwner = remoteClient.AgentId;
|
||||
|
||||
args.terrainBase0 = UUID.Zero;
|
||||
|
|
|
@ -729,7 +729,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
//If we are still here, then they are subdividing within one piece of land
|
||||
//Check owner
|
||||
if (!m_scene.ExternalChecks.ExternalChecksCanEditParcel(attempting_user_id, startLandObject))
|
||||
if (!m_scene.Permissions.CanEditParcel(attempting_user_id, startLandObject))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (!m_scene.ExternalChecks.ExternalChecksCanEditParcel(attempting_user_id, masterLandObject))
|
||||
if (!m_scene.Permissions.CanEditParcel(attempting_user_id, masterLandObject))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
if (land != null)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanBeGodLike(remote_client.AgentId))
|
||||
if (m_scene.Permissions.IsGod(remote_client.AgentId))
|
||||
{
|
||||
land.landData.OwnerID = ownerID;
|
||||
|
||||
|
@ -1029,7 +1029,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
if (land != null)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, land))
|
||||
if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land))
|
||||
{
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
|
||||
land.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
|
@ -1051,7 +1051,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
if (land != null)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, land))
|
||||
if (m_scene.Permissions.CanReclaimParcel(remote_client.AgentId, land))
|
||||
{
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
|
||||
land.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
|
@ -1321,7 +1321,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
if (land == null) return;
|
||||
|
||||
if (!m_scene.ExternalChecks.ExternalChecksCanEditParcel(remoteClient.AgentId, land))
|
||||
if (!m_scene.Permissions.CanEditParcel(remoteClient.AgentId, land))
|
||||
return;
|
||||
|
||||
land.landData.OtherCleanTime = otherCleanTime;
|
||||
|
|
|
@ -181,14 +181,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId,this))
|
||||
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId,this))
|
||||
{
|
||||
//Needs later group support
|
||||
LandData newData = landData.Copy();
|
||||
|
||||
if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanSellParcel(remote_client.AgentId, this))
|
||||
if (m_scene.Permissions.CanSellParcel(remote_client.AgentId, this))
|
||||
{
|
||||
newData.AuthBuyerID = args.AuthBuyerID;
|
||||
newData.SalePrice = args.SalePrice;
|
||||
|
@ -647,7 +647,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
public void sendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this))
|
||||
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
|
||||
{
|
||||
List<uint> resultLocalIDs = new List<uint>();
|
||||
try
|
||||
|
@ -697,7 +697,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
/// </param>
|
||||
public void sendLandObjectOwners(IClientAPI remote_client)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this))
|
||||
if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this))
|
||||
{
|
||||
Dictionary<UUID, int> primCount = new Dictionary<UUID, int>();
|
||||
|
||||
|
|
|
@ -180,50 +180,50 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
||||
|
||||
//Register functions with Scene External Checks!
|
||||
m_scene.ExternalChecks.addBypassPermissions(BypassPermissions); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addSetBypassPermissions(SetBypassPermissions); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addPropagatePermissions(PropagatePermissions); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckAbandonParcel(CanAbandonParcel); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckReclaimParcel(CanReclaimParcel); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addGenerateClientFlags(GenerateClientFlags); //NOT YET FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckBeGodLike(CanBeGodLike); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckDuplicateObject(CanDuplicateObject); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckDeleteObject(CanDeleteObject); //MAYBE FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckEditObject(CanEditObject);//MAYBE FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckEditParcel(CanEditParcel); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckInstantMessage(CanInstantMessage); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckInventoryTransfer(CanInventoryTransfer); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckIssueEstateCommand(CanIssueEstateCommand); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckMoveObject(CanMoveObject); //HOPEFULLY FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckObjectEntry(CanObjectEntry); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckReturnObject(CanReturnObject); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckRezObject(CanRezObject); //HOPEFULLY FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckRunConsoleCommand(CanRunConsoleCommand); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckRunScript(CanRunScript); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckSellParcel(CanSellParcel); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckTakeObject(CanTakeObject); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckTakeCopyObject(CanTakeCopyObject); //FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckTerraformLand(CanTerraformLand); //FULL IMPLEMENTED (POINT ONLY!!! NOT AREA!!!)
|
||||
m_scene.ExternalChecks.addCheckCanLinkObject(CanLinkObject); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckCanDelinkObject(CanDelinkObject); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckCanBuyLand(CanBuyLand); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddBypassPermissionsHandler(BypassPermissions); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddSetBypassPermissionsHandler(SetBypassPermissions); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddPropagatePermissionsHandler(PropagatePermissions); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddGenerateClientFlagsHandler(GenerateClientFlags); //NOT YET FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddAbandonParcelHandler(CanAbandonParcel); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddReclaimParcelHandler(CanReclaimParcel); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddIsGodHandler(IsGod); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddDuplicateObjectHandler(CanDuplicateObject); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddDeleteObjectHandler(CanDeleteObject); //MAYBE FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddEditObjectHandler(CanEditObject);//MAYBE FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddEditParcelHandler(CanEditParcel); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddInstantMessageHandler(CanInstantMessage); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddInventoryTransferHandler(CanInventoryTransfer); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddIssueEstateCommandHandler(CanIssueEstateCommand); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddMoveObjectHandler(CanMoveObject); //HOPEFULLY FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddObjectEntryHandler(CanObjectEntry); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddReturnObjectHandler(CanReturnObject); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddRezObjectHandler(CanRezObject); //HOPEFULLY FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddRunConsoleCommandHandler(CanRunConsoleCommand); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddRunScriptHandler(CanRunScript); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddSellParcelHandler(CanSellParcel); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddTakeObjectHandler(CanTakeObject); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddTakeCopyObjectHandler(CanTakeCopyObject); //FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddTerraformLandHandler(CanTerraformLand); //FULL IMPLEMENTED (POINT ONLY!!! NOT AREA!!!)
|
||||
m_scene.Permissions.AddCanLinkObjectHandler(CanLinkObject); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanDelinkObjectHandler(CanDelinkObject); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanBuyLandHandler(CanBuyLand); //NOT YET IMPLEMENTED
|
||||
|
||||
m_scene.ExternalChecks.addCheckViewNotecard(CanViewNotecard); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckViewScript(CanViewScript); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckEditNotecard(CanEditNotecard); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckEditScript(CanEditScript); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddViewNotecardHandler(CanViewNotecard); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddViewScriptHandler(CanViewScript); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddEditNotecardHandler(CanEditNotecard); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddEditScriptHandler(CanEditScript); //NOT YET IMPLEMENTED
|
||||
|
||||
m_scene.ExternalChecks.addCheckCanCreateObjectInventory(CanCreateObjectInventory); //NOT IMPLEMENTED HERE
|
||||
m_scene.ExternalChecks.addCheckEditObjectInventory(CanEditObjectInventory);//MAYBE FULLY IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckCanCopyObjectInventory(CanCopyObjectInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckCanDeleteObjectInventory(CanDeleteObjectInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanCreateObjectInventoryHandler(CanCreateObjectInventory); //NOT IMPLEMENTED HERE
|
||||
m_scene.Permissions.AddEditObjectInventoryHandler(CanEditObjectInventory);//MAYBE FULLY IMPLEMENTED
|
||||
m_scene.Permissions.AddCanCopyObjectInventoryHandler(CanCopyObjectInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanDeleteObjectInventoryHandler(CanDeleteObjectInventory); //NOT YET IMPLEMENTED
|
||||
|
||||
m_scene.ExternalChecks.addCheckCanCreateUserInventory(CanCreateUserInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckCanCopyUserInventory(CanCopyUserInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckCanEditUserInventory(CanEditUserInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.ExternalChecks.addCheckCanDeleteUserInventory(CanDeleteUserInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanCreateUserInventoryHandler(CanCreateUserInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanCopyUserInventoryHandler(CanCopyUserInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanEditUserInventoryHandler(CanEditUserInventory); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanDeleteUserInventoryHandler(CanDeleteUserInventory); //NOT YET IMPLEMENTED
|
||||
|
||||
m_scene.ExternalChecks.addCheckCanTeleport(CanTeleport); //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.AddCanTeleportHandler(CanTeleport); //NOT YET IMPLEMENTED
|
||||
|
||||
//Register Debug Commands
|
||||
Command bypassCommand = new Command("bypass", CommandIntentions.COMMAND_HAZARDOUS, InterfaceBypassPermissions, "Force the permissions a specific way to test permissions");
|
||||
|
@ -651,7 +651,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
return GenericParcelPermission(user, parcel);
|
||||
}
|
||||
|
||||
private bool CanBeGodLike(UUID user, Scene scene)
|
||||
private bool IsGod(UUID user, Scene scene)
|
||||
{
|
||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||
|
|
|
@ -616,7 +616,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
|||
private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action,
|
||||
float north, float west, float south, float east, UUID agentId)
|
||||
{
|
||||
bool god = m_scene.ExternalChecks.ExternalChecksCanBeGodLike(user);
|
||||
bool god = m_scene.Permissions.IsGod(user);
|
||||
bool allowed = false;
|
||||
if (north == south && east == west)
|
||||
{
|
||||
|
@ -641,7 +641,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
|||
int y = zy + dy;
|
||||
if (x>=0 && y>=0 && x<m_channel.Width && y<m_channel.Height)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(agentId, new Vector3(x,y,0)))
|
||||
if (m_scene.Permissions.CanTerraformLand(agentId, new Vector3(x,y,0)))
|
||||
{
|
||||
allowMask[x, y] = true;
|
||||
allowed = true;
|
||||
|
@ -679,7 +679,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
|||
{
|
||||
if (y < north && y > south)
|
||||
{
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(agentId, new Vector3(x,y,0)))
|
||||
if (m_scene.Permissions.CanTerraformLand(agentId, new Vector3(x,y,0)))
|
||||
{
|
||||
fillArea[x, y] = true;
|
||||
allowed = true;
|
||||
|
@ -709,7 +709,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
|||
// Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area.
|
||||
// for now check a point in the centre of the region
|
||||
|
||||
if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remoteClient.AgentId, true))
|
||||
if (m_scene.Permissions.CanIssueEstateCommand(remoteClient.AgentId, true))
|
||||
{
|
||||
InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
userInfo.AddItem(item);
|
||||
|
||||
int userlevel = 0;
|
||||
if (ExternalChecks.ExternalChecksCanBeGodLike(AgentID))
|
||||
if (Permissions.IsGod(AgentID))
|
||||
{
|
||||
userlevel = 1;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
if ((InventoryType) item.InvType == InventoryType.Notecard)
|
||||
{
|
||||
if (!ExternalChecks.ExternalChecksCanEditNotecard(itemID, UUID.Zero, remoteClient.AgentId))
|
||||
if (!Permissions.CanEditNotecard(itemID, UUID.Zero, remoteClient.AgentId))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage("Insufficient permissions to edit notecard", false);
|
||||
return UUID.Zero;
|
||||
|
@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
else if ((InventoryType) item.InvType == InventoryType.LSL)
|
||||
{
|
||||
if (!ExternalChecks.ExternalChecksCanEditScript(itemID, UUID.Zero, remoteClient.AgentId))
|
||||
if (!Permissions.CanEditScript(itemID, UUID.Zero, remoteClient.AgentId))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false);
|
||||
return UUID.Zero;
|
||||
|
@ -243,7 +243,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, UUID itemId,
|
||||
UUID primId, bool isScriptRunning, byte[] data)
|
||||
{
|
||||
if (!ExternalChecks.ExternalChecksCanEditScript(itemId, primId, remoteClient.AgentId))
|
||||
if (!Permissions.CanEditScript(itemId, primId, remoteClient.AgentId))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false);
|
||||
return;
|
||||
|
@ -432,7 +432,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (item != null)
|
||||
{
|
||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (!Permissions.BypassPermissions())
|
||||
{
|
||||
if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
|
||||
return null;
|
||||
|
@ -458,7 +458,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
itemCopy.AssetType = item.AssetType;
|
||||
itemCopy.InvType = item.InvType;
|
||||
itemCopy.Folder = UUID.Zero;
|
||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if (Permissions.PropagatePermissions())
|
||||
{
|
||||
if (item.InvType == 6)
|
||||
{
|
||||
|
@ -500,7 +500,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
recipientUserInfo.AddItem(itemCopy);
|
||||
|
||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (!Permissions.BypassPermissions())
|
||||
{
|
||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
senderUserInfo.DeleteItem(itemId);
|
||||
|
@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
|
||||
|
||||
if (!ExternalChecks.ExternalChecksCanCreateUserInventory(invType, remoteClient.AgentId))
|
||||
if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
|
||||
return;
|
||||
|
||||
if (transactionID == UUID.Zero)
|
||||
|
@ -975,7 +975,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
agentItem.InvType = taskItem.InvType;
|
||||
agentItem.Flags = taskItem.Flags;
|
||||
|
||||
if ((destAgent != taskItem.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if ((destAgent != taskItem.OwnerID) && Permissions.PropagatePermissions())
|
||||
{
|
||||
agentItem.BasePermissions = taskItem.NextPermissions;
|
||||
agentItem.CurrentPermissions = taskItem.NextPermissions | 8;
|
||||
|
@ -992,7 +992,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
agentItem.GroupPermissions = taskItem.GroupPermissions;
|
||||
}
|
||||
|
||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (!Permissions.BypassPermissions())
|
||||
{
|
||||
if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
part.Inventory.RemoveInventoryItem(itemId);
|
||||
|
@ -1165,7 +1165,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (destPart.OwnerID != part.OwnerID)
|
||||
{
|
||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if (Permissions.PropagatePermissions())
|
||||
{
|
||||
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
|
||||
srcTaskItem.NextPermissions;
|
||||
|
@ -1262,7 +1262,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// AllowInventoryDrop flag has been set. Don't however let
|
||||
// them update an item unless they pass the external checks
|
||||
//
|
||||
if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)
|
||||
if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId)
|
||||
&& (currentItem != null || !allowInventoryDrop))
|
||||
return;
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
"[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
|
||||
item.Name, primLocalID, remoteClient.Name);
|
||||
part.GetProperties(remoteClient);
|
||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (!Permissions.BypassPermissions())
|
||||
{
|
||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
RemoveInventoryItem(remoteClient, itemID);
|
||||
|
@ -1358,7 +1358,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId))
|
||||
if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId))
|
||||
return;
|
||||
|
||||
part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID);
|
||||
|
@ -1400,7 +1400,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return;
|
||||
|
||||
if (!ExternalChecks.ExternalChecksCanCreateObjectInventory(
|
||||
if (!Permissions.CanCreateObjectInventory(
|
||||
itemBase.InvType, part.UUID, remoteClient.AgentId))
|
||||
return;
|
||||
|
||||
|
@ -1506,7 +1506,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (destPart.OwnerID != srcPart.OwnerID)
|
||||
{
|
||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if (Permissions.PropagatePermissions())
|
||||
{
|
||||
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
|
||||
srcTaskItem.NextPermissions;
|
||||
|
@ -1567,20 +1567,20 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (destination == 1) // Take Copy
|
||||
{
|
||||
permissionToTake =
|
||||
ExternalChecks.ExternalChecksCanTakeCopyObject(
|
||||
Permissions.CanTakeCopyObject(
|
||||
grp.UUID,
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
else if (destination == 5) // God take copy
|
||||
{
|
||||
permissionToTake =
|
||||
ExternalChecks.ExternalChecksCanBeGodLike(
|
||||
Permissions.IsGod(
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
else if (destination == 4) // Take
|
||||
{
|
||||
permissionToTake =
|
||||
ExternalChecks.ExternalChecksCanTakeObject(
|
||||
Permissions.CanTakeObject(
|
||||
grp.UUID,
|
||||
remoteClient.AgentId);
|
||||
|
||||
|
@ -1590,11 +1590,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
else if (destination == 6) //Delete
|
||||
{
|
||||
permissionToTake =
|
||||
ExternalChecks.ExternalChecksCanDeleteObject(
|
||||
Permissions.CanDeleteObject(
|
||||
grp.UUID,
|
||||
remoteClient.AgentId);
|
||||
permissionToDelete =
|
||||
ExternalChecks.ExternalChecksCanDeleteObject(
|
||||
Permissions.CanDeleteObject(
|
||||
grp.UUID,
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
|
@ -1603,11 +1603,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (remoteClient != null)
|
||||
{
|
||||
permissionToTake =
|
||||
ExternalChecks.ExternalChecksCanDeleteObject(
|
||||
Permissions.CanDeleteObject(
|
||||
grp.UUID,
|
||||
remoteClient.AgentId);
|
||||
permissionToDelete =
|
||||
ExternalChecks.ExternalChecksCanDeleteObject(
|
||||
Permissions.CanDeleteObject(
|
||||
grp.UUID,
|
||||
remoteClient.AgentId);
|
||||
if (permissionToDelete)
|
||||
|
@ -1722,7 +1722,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
item.InvType = (int)InventoryType.Object;
|
||||
item.Folder = folderID;
|
||||
|
||||
if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions())
|
||||
{
|
||||
uint perms=objectGroup.GetEffectivePermissions();
|
||||
uint nextPerms=(perms & 7) << 13;
|
||||
|
@ -1877,7 +1877,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
item.Folder = UUID.Zero; // Objects folder!
|
||||
|
||||
if ((remoteClient.AgentId != grp.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if ((remoteClient.AgentId != grp.RootPart.OwnerID) && Permissions.PropagatePermissions())
|
||||
{
|
||||
item.BasePermissions = grp.RootPart.NextOwnerMask;
|
||||
item.CurrentPermissions = grp.RootPart.NextOwnerMask;
|
||||
|
@ -1988,7 +1988,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
string xmlData = Utils.BytesToString(rezAsset.Data);
|
||||
SceneObjectGroup group = new SceneObjectGroup(xmlData, true);
|
||||
if (!ExternalChecks.ExternalChecksCanRezObject(
|
||||
if (!Permissions.CanRezObject(
|
||||
group.Children.Count, remoteClient.AgentId, pos)
|
||||
&& !attachment)
|
||||
{
|
||||
|
@ -2043,7 +2043,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
rootPart.ObjectSaleType = 0;
|
||||
rootPart.SalePrice = 10;
|
||||
|
||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if (Permissions.PropagatePermissions())
|
||||
{
|
||||
if ((item.CurrentPermissions & 8) != 0)
|
||||
{
|
||||
|
@ -2093,7 +2093,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (!attachment)
|
||||
rootPart.ScheduleFullUpdate();
|
||||
|
||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (!Permissions.BypassPermissions())
|
||||
{
|
||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
userInfo.DeleteItem(item.ID);
|
||||
|
@ -2133,7 +2133,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
string xmlData = Utils.BytesToString(rezAsset.Data);
|
||||
SceneObjectGroup group = new SceneObjectGroup(xmlData, true);
|
||||
|
||||
if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, ownerID, pos))
|
||||
if (!Permissions.CanRezObject(group.Children.Count, ownerID, pos))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -2158,7 +2158,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (rootPart.OwnerID != item.OwnerID)
|
||||
{
|
||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if (Permissions.PropagatePermissions())
|
||||
{
|
||||
if ((item.CurrentPermissions & 8) != 0)
|
||||
{
|
||||
|
@ -2197,7 +2197,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
group.CreateScriptInstances(param, true, DefaultScriptEngine, 2);
|
||||
rootPart.ScheduleFullUpdate();
|
||||
|
||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (!Permissions.BypassPermissions())
|
||||
{
|
||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
sourcePart.Inventory.RemoveInventoryItem(item.ItemID);
|
||||
|
@ -2315,7 +2315,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
ScenePresence presence;
|
||||
if (TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
{
|
||||
if (!ExternalChecks.ExternalChecksCanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition))
|
||||
if (!Permissions.CanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition))
|
||||
return;
|
||||
|
||||
presence.Appearance.DetachAttachment(itemID);
|
||||
|
@ -2359,7 +2359,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs)
|
||||
{
|
||||
if (!ExternalChecks.ExternalChecksCanBeGodLike(remoteClient.AgentId))
|
||||
if (!Permissions.IsGod(remoteClient.AgentId))
|
||||
return;
|
||||
|
||||
foreach (uint localID in localIDs)
|
||||
|
|
|
@ -113,8 +113,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
((SceneObjectGroup) ent).GetProperties(remoteClient);
|
||||
((SceneObjectGroup) ent).IsSelected = true;
|
||||
// A prim is only tainted if it's allowed to be edited by the person clicking it.
|
||||
if (ExternalChecks.ExternalChecksCanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
|
||||
|| ExternalChecks.ExternalChecksCanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
|
||||
if (Permissions.CanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
|
||||
|| Permissions.CanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
|
||||
{
|
||||
EventManager.TriggerParcelPrimCountTainted();
|
||||
}
|
||||
|
@ -181,9 +181,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
//
|
||||
if (!isAttachment)
|
||||
{
|
||||
if (ExternalChecks.ExternalChecksCanEditObject(
|
||||
if (Permissions.CanEditObject(
|
||||
part.UUID, remoteClient.AgentId)
|
||||
|| ExternalChecks.ExternalChecksCanMoveObject(
|
||||
|| Permissions.CanMoveObject(
|
||||
part.UUID, remoteClient.AgentId))
|
||||
EventManager.TriggerParcelPrimCountTainted();
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (part == null)
|
||||
return;
|
||||
|
||||
if (ExternalChecks.ExternalChecksCanResetScript(itemID, remoteClient.AgentId))
|
||||
if (Permissions.CanResetScript(itemID, remoteClient.AgentId))
|
||||
{
|
||||
EventManager.TriggerScriptReset(part.LocalId, itemID);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -293,7 +293,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_seeIntoRegionFromNeighbor = SeeIntoRegionFromNeighbor;
|
||||
|
||||
m_eventManager = new EventManager();
|
||||
m_externalChecks = new SceneExternalChecks(this);
|
||||
m_permissions = new ScenePermissions(this);
|
||||
|
||||
m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
|
||||
m_asyncSceneObjectDeleter.Enabled = true;
|
||||
|
@ -1750,7 +1750,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
Vector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new Vector3(0.5f, 0.5f, 0.5f), false);
|
||||
|
||||
if (ExternalChecks.ExternalChecksCanRezObject(1, ownerID, pos))
|
||||
if (Permissions.CanRezObject(1, ownerID, pos))
|
||||
{
|
||||
// rez ON the ground, not IN the ground
|
||||
pos.Z += 0.25F;
|
||||
|
@ -3450,7 +3450,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
// First check that this is the sim owner
|
||||
if (ExternalChecks.ExternalChecksCanBeGodLike(agentID))
|
||||
if (Permissions.IsGod(agentID))
|
||||
{
|
||||
// Next we check for spoofing.....
|
||||
UUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId;
|
||||
|
@ -3527,7 +3527,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
if (m_scenePresences.ContainsKey(agentID) || agentID == kickUserID)
|
||||
{
|
||||
if (ExternalChecks.ExternalChecksCanBeGodLike(godID))
|
||||
if (Permissions.IsGod(godID))
|
||||
{
|
||||
if (agentID == kickUserID)
|
||||
{
|
||||
|
@ -3848,7 +3848,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
else if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0)
|
||||
{
|
||||
if (part.OwnerID == parcel.landData.OwnerID || (parcel.landData.IsGroupOwned && part.GroupID == parcel.landData.GroupID) || ExternalChecks.ExternalChecksCanBeGodLike(part.OwnerID))
|
||||
if (part.OwnerID == parcel.landData.OwnerID || (parcel.landData.IsGroupOwned && part.GroupID == parcel.landData.GroupID) || Permissions.IsGod(part.OwnerID))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -4273,7 +4273,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
List<SceneObjectPart> partList =
|
||||
new List<SceneObjectPart>(group.Children.Values);
|
||||
|
||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
if (Permissions.PropagatePermissions())
|
||||
{
|
||||
foreach (SceneObjectPart child in partList)
|
||||
{
|
||||
|
|
|
@ -84,10 +84,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
|
||||
protected SceneExternalChecks m_externalChecks;
|
||||
public SceneExternalChecks ExternalChecks
|
||||
protected ScenePermissions m_permissions;
|
||||
public ScenePermissions Permissions
|
||||
{
|
||||
get { return m_externalChecks; }
|
||||
get { return m_permissions; }
|
||||
}
|
||||
|
||||
protected string m_datastore;
|
||||
|
|
|
@ -599,7 +599,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, Vector3 position,
|
||||
Vector3 lookAt, uint teleportFlags)
|
||||
{
|
||||
if (!avatar.Scene.ExternalChecks.ExternalChecksCanTeleport(avatar.UUID))
|
||||
if (!avatar.Scene.Permissions.CanTeleport(avatar.UUID))
|
||||
return;
|
||||
|
||||
bool destRegionUp = false;
|
||||
|
|
|
@ -431,7 +431,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
SceneObjectGroup group = (SceneObjectGroup)obj;
|
||||
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
group.SetGroup(GroupID, remoteClient);
|
||||
else
|
||||
remoteClient.SendAgentAlertMessage("You don't have permission to set the group", false);
|
||||
|
@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (part == null)
|
||||
return;
|
||||
|
||||
if (!m_parentScene.ExternalChecks.ExternalChecksCanTakeObject(
|
||||
if (!m_parentScene.Permissions.CanTakeObject(
|
||||
part.UUID, remoteClient.AgentId))
|
||||
return;
|
||||
|
||||
|
@ -522,7 +522,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (((SceneObjectGroup)obj).LocalId == objectLocalID)
|
||||
{
|
||||
SceneObjectGroup group = (SceneObjectGroup)obj;
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanTakeObject(obj.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanTakeObject(obj.UUID, remoteClient.AgentId))
|
||||
{
|
||||
// If the attachment point isn't the same as the one previously used
|
||||
// set it's offset position = 0 so that it appears on the attachment point
|
||||
|
@ -1056,7 +1056,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.Resize(scale, localID);
|
||||
}
|
||||
|
@ -1068,7 +1068,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.GroupResize(scale, localID);
|
||||
}
|
||||
|
@ -1104,7 +1104,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.UpdateSingleRotation(rot, localID);
|
||||
}
|
||||
|
@ -1122,7 +1122,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.UpdateGroupRotation(rot);
|
||||
}
|
||||
|
@ -1141,7 +1141,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.UpdateGroupRotation(pos, rot);
|
||||
}
|
||||
|
@ -1159,7 +1159,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment)
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment)
|
||||
{
|
||||
group.UpdateSinglePosition(pos, localID);
|
||||
}
|
||||
|
@ -1185,7 +1185,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
else
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment)
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment)
|
||||
{
|
||||
group.UpdateGroupPosition(pos);
|
||||
}
|
||||
|
@ -1204,7 +1204,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID,remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId))
|
||||
{
|
||||
group.UpdateTextureEntry(localID, texture);
|
||||
}
|
||||
|
@ -1222,7 +1222,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.UpdatePrimFlags(localID, UsePhysics, IsTemporary, IsPhantom);
|
||||
}
|
||||
|
@ -1241,7 +1241,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(objectID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
|
||||
{
|
||||
group.GrabMovement(offset, pos, remoteClient);
|
||||
}
|
||||
|
@ -1263,7 +1263,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.SetPartName(Util.CleanString(name), primLocalID);
|
||||
group.HasGroupChanged = true;
|
||||
|
@ -1281,7 +1281,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
group.SetPartDescription(Util.CleanString(description), primLocalID);
|
||||
group.HasGroupChanged = true;
|
||||
|
@ -1294,7 +1294,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
|
||||
part.ClickAction = Convert.ToByte(clickAction);
|
||||
|
@ -1308,7 +1308,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
|
||||
part.Material = Convert.ToByte(material);
|
||||
|
@ -1323,7 +1323,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID,agentID))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.UUID,agentID))
|
||||
{
|
||||
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
||||
}
|
||||
|
@ -1340,7 +1340,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.GetPartsFullID(primLocalID), agentID))
|
||||
if (m_parentScene.Permissions.CanEditObject(group.GetPartsFullID(primLocalID), agentID))
|
||||
{
|
||||
ObjectShapePacket.ObjectDataBlock shapeData = new ObjectShapePacket.ObjectDataBlock();
|
||||
shapeData.ObjectLocalID = shapeBlock.ObjectLocalID;
|
||||
|
@ -1612,12 +1612,12 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// libomv will complain about PrimFlags.JointWheel being
|
||||
// deprecated, so we
|
||||
#pragma warning disable 0612
|
||||
if (IncludeInSearch && m_parentScene.ExternalChecks.ExternalChecksCanEditObject(objid, user))
|
||||
if (IncludeInSearch && m_parentScene.Permissions.CanEditObject(objid, user))
|
||||
{
|
||||
obj.ParentGroup.RootPart.AddFlag(PrimFlags.JointWheel);
|
||||
obj.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
else if (!IncludeInSearch && m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(objid,user))
|
||||
else if (!IncludeInSearch && m_parentScene.Permissions.CanMoveObject(objid,user))
|
||||
{
|
||||
obj.ParentGroup.RootPart.RemFlag(PrimFlags.JointWheel);
|
||||
obj.ParentGroup.HasGroupChanged = true;
|
||||
|
@ -1665,7 +1665,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (originPrim != null)
|
||||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanDuplicateObject(originPrim.Children.Count, originPrim.UUID, AgentID, originPrim.AbsolutePosition))
|
||||
if (m_parentScene.Permissions.CanDuplicateObject(originPrim.Children.Count, originPrim.UUID, AgentID, originPrim.AbsolutePosition))
|
||||
{
|
||||
SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID, true);
|
||||
copy.AbsolutePosition = copy.AbsolutePosition + offset;
|
||||
|
|
|
@ -261,7 +261,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions)
|
||||
{
|
||||
ForEachCurrentScene(delegate(Scene scene) { scene.ExternalChecks.ExternalChecksSetBypassPermissions(bypassPermissions); });
|
||||
ForEachCurrentScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); });
|
||||
}
|
||||
|
||||
private void ForEachCurrentScene(Action<Scene> func)
|
||||
|
|
|
@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (remoteClient != null &&
|
||||
remoteClient.AgentId != part.OwnerID &&
|
||||
m_scene.ExternalChecks.ExternalChecksPropagatePermissions())
|
||||
m_scene.Permissions.PropagatePermissions())
|
||||
{
|
||||
taskItem.BasePermissions = item.BasePermissions &
|
||||
item.NextPermissions;
|
||||
|
|
|
@ -1277,14 +1277,14 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
||||
{
|
||||
SendPartFullUpdate(remoteClient, RootPart, m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
|
||||
SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
|
||||
|
||||
lock (m_parts)
|
||||
{
|
||||
foreach (SceneObjectPart part in m_parts.Values)
|
||||
{
|
||||
if (part != RootPart)
|
||||
SendPartFullUpdate(remoteClient, part, m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(remoteClient.AgentId, part.UUID));
|
||||
SendPartFullUpdate(remoteClient, part, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1493,7 +1493,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (part.OwnerID != cAgentID)
|
||||
{
|
||||
// Apply Next Owner Permissions if we're not bypassing permissions
|
||||
if (!m_scene.ExternalChecks.ExternalChecksBypassPermissions())
|
||||
if (!m_scene.Permissions.BypassPermissions())
|
||||
ApplyNextOwnerPermissions();
|
||||
}
|
||||
|
||||
|
|
|
@ -2997,7 +2997,7 @@ if (m_shape != null) {
|
|||
public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF)
|
||||
{
|
||||
bool set = addRemTF == 1;
|
||||
bool god = m_parentGroup.Scene.ExternalChecks.ExternalChecksCanBeGodLike(AgentID);
|
||||
bool god = m_parentGroup.Scene.Permissions.IsGod(AgentID);
|
||||
|
||||
uint baseMask = _baseMask;
|
||||
if (god)
|
||||
|
|
|
@ -230,7 +230,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// "Starting script {0}, {1} in prim {2}, {3}",
|
||||
// item.Name, item.ItemID, Name, UUID);
|
||||
|
||||
if (!m_part.ParentGroup.Scene.ExternalChecks.ExternalChecksCanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
|
||||
if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
|
||||
return;
|
||||
|
||||
m_part.AddFlag(PrimFlags.Scripted);
|
||||
|
|
|
@ -577,7 +577,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public uint GenerateClientFlags(UUID ObjectID)
|
||||
{
|
||||
return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID);
|
||||
return m_scene.Permissions.GenerateClientFlags(m_uuid, ObjectID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -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)?
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue