mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Merge branch 'avination-current' into ubitwork
This commit is contained in:
@@ -195,7 +195,9 @@ namespace OpenSim
|
||||
|
||||
m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
|
||||
|
||||
string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule");
|
||||
string permissionModules = Util.GetConfigVarFromSections<string>(Config, "permissionmodules",
|
||||
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
|
||||
|
||||
m_permsModules = new List<string>(permissionModules.Split(','));
|
||||
}
|
||||
|
||||
@@ -392,29 +394,19 @@ namespace OpenSim
|
||||
}
|
||||
else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
|
||||
|
||||
// XPTO: Fix this
|
||||
// if (m_securePermissionsLoading)
|
||||
// {
|
||||
// foreach (string s in m_permsModules)
|
||||
// {
|
||||
// if (!scene.RegionModules.ContainsKey(s))
|
||||
// {
|
||||
// bool found = false;
|
||||
// foreach (IRegionModule m in modules)
|
||||
// {
|
||||
// if (m.Name == s)
|
||||
// {
|
||||
// found = true;
|
||||
// }
|
||||
// }
|
||||
// if (!found)
|
||||
// {
|
||||
// m_log.Fatal("[MODULES]: Required module " + s + " not found.");
|
||||
// Environment.Exit(0);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (m_securePermissionsLoading)
|
||||
{
|
||||
foreach (string s in m_permsModules)
|
||||
{
|
||||
if (!scene.RegionModules.ContainsKey(s))
|
||||
{
|
||||
m_log.Fatal("[MODULES]: Required module " + s + " not found.");
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules.ToArray()));
|
||||
}
|
||||
|
||||
scene.SetModuleInterfaces();
|
||||
// First Step of bootreport sequence
|
||||
|
||||
@@ -990,13 +990,20 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
else
|
||||
prim.Name = assetName + "#" + i.ToString();
|
||||
|
||||
prim.EveryoneMask = 0;
|
||||
prim.GroupMask = 0;
|
||||
|
||||
if (restrictPerms)
|
||||
{
|
||||
prim.BaseMask = (uint)(PermissionMask.Move | PermissionMask.Modify);
|
||||
prim.EveryoneMask = 0;
|
||||
prim.GroupMask = 0;
|
||||
prim.NextOwnerMask = 0;
|
||||
prim.OwnerMask = (uint)(PermissionMask.Move | PermissionMask.Modify);
|
||||
prim.NextOwnerMask = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
prim.BaseMask = (uint)PermissionMask.All | (uint)PermissionMask.Export;
|
||||
prim.OwnerMask = (uint)PermissionMask.All | (uint)PermissionMask.Export;
|
||||
prim.NextOwnerMask = (uint)PermissionMask.Transfer;
|
||||
}
|
||||
|
||||
if(istest)
|
||||
@@ -1099,21 +1106,17 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
if (restrictPerms)
|
||||
{
|
||||
item.CurrentPermissions
|
||||
= (uint)(PermissionMask.Move | PermissionMask.Modify);
|
||||
|
||||
item.BasePermissions = (uint)(PermissionMask.Move | PermissionMask.Modify);
|
||||
item.CurrentPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify);
|
||||
item.EveryOnePermissions = 0;
|
||||
item.NextPermissions = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.CurrentPermissions
|
||||
= (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export);
|
||||
|
||||
item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
|
||||
item.CurrentPermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
|
||||
item.EveryOnePermissions = 0;
|
||||
item.NextPermissions = (uint)PermissionMask.All;
|
||||
item.NextPermissions = (uint)PermissionMask.Transfer;
|
||||
}
|
||||
|
||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||
|
||||
@@ -77,6 +77,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>();
|
||||
private static Thread[] m_workerThreads = null;
|
||||
|
||||
private string m_Url = "localhost";
|
||||
|
||||
private static OpenMetaverse.BlockingQueue<aPollRequest> m_queue =
|
||||
new OpenMetaverse.BlockingQueue<aPollRequest>();
|
||||
|
||||
@@ -86,6 +88,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig config = source.Configs["ClientStack.LindenCaps"];
|
||||
if (config != null)
|
||||
m_Url = config.GetString("Cap_GetTexture", "localhost");
|
||||
}
|
||||
|
||||
public void AddRegion(Scene s)
|
||||
@@ -343,27 +348,34 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
private void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
string capUrl = "/CAPS/" + UUID.Random() + "/";
|
||||
|
||||
// Register this as a poll service
|
||||
PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene);
|
||||
|
||||
args.Type = PollServiceEventArgs.EventType.Texture;
|
||||
MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
|
||||
|
||||
string hostName = m_scene.RegionInfo.ExternalHostName;
|
||||
uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
|
||||
string protocol = "http";
|
||||
|
||||
if (MainServer.Instance.UseSSL)
|
||||
if (m_Url == "localhost")
|
||||
{
|
||||
hostName = MainServer.Instance.SSLCommonName;
|
||||
port = MainServer.Instance.SSLPort;
|
||||
protocol = "https";
|
||||
string capUrl = "/CAPS/" + UUID.Random() + "/";
|
||||
|
||||
// Register this as a poll service
|
||||
PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene);
|
||||
|
||||
args.Type = PollServiceEventArgs.EventType.Texture;
|
||||
MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
|
||||
|
||||
string hostName = m_scene.RegionInfo.ExternalHostName;
|
||||
uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
|
||||
string protocol = "http";
|
||||
|
||||
if (MainServer.Instance.UseSSL)
|
||||
{
|
||||
hostName = MainServer.Instance.SSLCommonName;
|
||||
port = MainServer.Instance.SSLPort;
|
||||
protocol = "https";
|
||||
}
|
||||
caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
|
||||
m_pollservices[agentID] = args;
|
||||
m_capsDict[agentID] = capUrl;
|
||||
}
|
||||
else
|
||||
{
|
||||
caps.RegisterHandler("GetTexture", m_Url);
|
||||
}
|
||||
caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
|
||||
m_pollservices[agentID] = args;
|
||||
m_capsDict[agentID] = capUrl;
|
||||
}
|
||||
|
||||
private void DeregisterCaps(UUID agentID, Caps caps)
|
||||
|
||||
@@ -2233,9 +2233,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
|
||||
{
|
||||
m_activeGroupID = activegroupid;
|
||||
m_activeGroupName = groupname;
|
||||
m_activeGroupPowers = grouppowers;
|
||||
if (agentid == AgentId)
|
||||
{
|
||||
m_activeGroupID = activegroupid;
|
||||
m_activeGroupName = groupname;
|
||||
m_activeGroupPowers = grouppowers;
|
||||
}
|
||||
|
||||
AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate);
|
||||
sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid;
|
||||
@@ -3933,6 +3936,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
part.Shape.ProfileHollow = 27500;
|
||||
}
|
||||
}
|
||||
else if (update.Entity is ScenePresence)
|
||||
{
|
||||
ScenePresence presence = (ScenePresence)update.Entity;
|
||||
|
||||
// If ParentUUID is not UUID.Zero and ParentID is 0, this
|
||||
// avatar is in the process of crossing regions while
|
||||
// sat on an object. In this state, we don't want any
|
||||
// updates because they will visually orbit the avatar.
|
||||
// Update will be forced once crossing is completed anyway.
|
||||
if (presence.ParentUUID != UUID.Zero && presence.ParentID == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
++updatesThisCall;
|
||||
|
||||
|
||||
@@ -100,13 +100,25 @@ namespace OpenSim.Region.ClientStack
|
||||
// "OOB" Server
|
||||
if (m_networkServersInfo.ssl_listener)
|
||||
{
|
||||
BaseHttpServer server = new BaseHttpServer(
|
||||
m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path,
|
||||
m_networkServersInfo.cert_pass);
|
||||
if (!m_networkServersInfo.ssl_external)
|
||||
{
|
||||
BaseHttpServer server = new BaseHttpServer(
|
||||
m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path,
|
||||
m_networkServersInfo.cert_pass);
|
||||
|
||||
m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
|
||||
MainServer.AddHttpServer(server);
|
||||
server.Start();
|
||||
m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
|
||||
MainServer.AddHttpServer(server);
|
||||
server.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseHttpServer server = new BaseHttpServer(
|
||||
m_networkServersInfo.https_port);
|
||||
|
||||
m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port);
|
||||
MainServer.AddHttpServer(server);
|
||||
server.Start();
|
||||
}
|
||||
}
|
||||
|
||||
base.StartupSpecific();
|
||||
@@ -132,4 +144,4 @@ namespace OpenSim.Region.ClientStack
|
||||
return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
// If we're an NPC then skip all the item checks and manipulations since we don't have an
|
||||
// inventory right now.
|
||||
RezSingleAttachmentFromInventoryInternal(
|
||||
sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, p, true, null);
|
||||
sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, p, true, d);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -182,6 +182,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||
try
|
||||
{
|
||||
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||
if (obj == null)
|
||||
return;
|
||||
if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0
|
||||
|| avatar.Scene.RegionInfo.RegionSettings.AllowDamage)
|
||||
{
|
||||
|
||||
@@ -40,6 +40,13 @@ using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
{
|
||||
public struct SendReply
|
||||
{
|
||||
public bool Success;
|
||||
public string Message;
|
||||
public int Disposition;
|
||||
}
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")]
|
||||
public class OfflineMessageModule : ISharedRegionModule
|
||||
{
|
||||
@@ -50,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
private string m_RestURL = String.Empty;
|
||||
IMessageTransferModule m_TransferModule = null;
|
||||
private bool m_ForwardOfflineGroupMessages = true;
|
||||
private Dictionary<IClientAPI, List<UUID>> m_repliesSent= new Dictionary<IClientAPI, List<UUID>>();
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
@@ -169,6 +177,12 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
client.OnRetrieveInstantMessages += RetrieveInstantMessages;
|
||||
client.OnLogout += OnClientLoggedOut;
|
||||
}
|
||||
|
||||
public void OnClientLoggedOut(IClientAPI client)
|
||||
{
|
||||
m_repliesSent.Remove(client);
|
||||
}
|
||||
|
||||
private void RetrieveInstantMessages(IClientAPI client)
|
||||
@@ -228,7 +242,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
if (scene == null)
|
||||
scene = m_SceneList[0];
|
||||
|
||||
bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
|
||||
SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>(
|
||||
"POST", m_RestURL+"/SaveMessage/?scope=" +
|
||||
scene.RegionInfo.ScopeID.ToString(), im);
|
||||
|
||||
@@ -238,13 +252,38 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
if (client == null)
|
||||
return;
|
||||
|
||||
client.SendInstantMessage(new GridInstantMessage(
|
||||
null, new UUID(im.toAgentID),
|
||||
"System", new UUID(im.fromAgentID),
|
||||
(byte)InstantMessageDialog.MessageFromAgent,
|
||||
"User is not logged in. "+
|
||||
(success ? "Message saved." : "Message not saved"),
|
||||
false, new Vector3()));
|
||||
if (reply.Message == String.Empty)
|
||||
reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved");
|
||||
|
||||
bool sendReply = true;
|
||||
|
||||
switch (reply.Disposition)
|
||||
{
|
||||
case 0: // Normal
|
||||
break;
|
||||
case 1: // Only once per user
|
||||
if (m_repliesSent.ContainsKey(client) && m_repliesSent[client].Contains(new UUID(im.toAgentID)))
|
||||
{
|
||||
sendReply = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_repliesSent.ContainsKey(client))
|
||||
m_repliesSent[client] = new List<UUID>();
|
||||
m_repliesSent[client].Add(new UUID(im.toAgentID));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (sendReply)
|
||||
{
|
||||
client.SendInstantMessage(new GridInstantMessage(
|
||||
null, new UUID(im.toAgentID),
|
||||
"System", new UUID(im.fromAgentID),
|
||||
(byte)InstantMessageDialog.MessageFromAgent,
|
||||
reply.Message,
|
||||
false, new Vector3()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
remoteClient.SendAgentAlertMessage("Notecard saved", false);
|
||||
remoteClient.SendAlertMessage("Notecard saved");
|
||||
}
|
||||
else if ((InventoryType)item.InvType == InventoryType.LSL)
|
||||
{
|
||||
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
remoteClient.SendAgentAlertMessage("Script saved", false);
|
||||
remoteClient.SendAlertMessage("Script saved");
|
||||
}
|
||||
|
||||
AssetBase asset =
|
||||
@@ -799,6 +799,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(xmlData);
|
||||
XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
|
||||
Vector3 rez_pos;
|
||||
if (e == null || attachment) // Single
|
||||
{
|
||||
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
|
||||
@@ -820,6 +821,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
|
||||
BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false);
|
||||
pos.Z += offsetHeight;
|
||||
rez_pos = pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -834,6 +836,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
BypassRayCast, bRayEndIsIntersection, true,
|
||||
bbox, false);
|
||||
|
||||
rez_pos = pos;
|
||||
|
||||
pos -= bbox / 2;
|
||||
|
||||
XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
|
||||
@@ -870,7 +874,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
primcount += g.PrimCount;
|
||||
|
||||
if (!m_Scene.Permissions.CanRezObject(
|
||||
primcount, remoteClient.AgentId, pos)
|
||||
primcount, remoteClient.AgentId, rez_pos)
|
||||
&& !attachment)
|
||||
{
|
||||
// The client operates in no fail mode. It will
|
||||
@@ -887,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
return null;
|
||||
}
|
||||
|
||||
if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment))
|
||||
if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, rez_pos, attachment))
|
||||
return null;
|
||||
|
||||
for (int i = 0; i < objlist.Count; i++)
|
||||
|
||||
@@ -96,6 +96,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
|
||||
m_commands = new EstateManagementCommands(this);
|
||||
m_commands.Initialise();
|
||||
|
||||
m_regionChangeTimer.Interval = 10000;
|
||||
m_regionChangeTimer.Elapsed += RaiseRegionInfoChange;
|
||||
m_regionChangeTimer.AutoReset = false;
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene) {}
|
||||
|
||||
@@ -565,7 +565,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
requiredPowers = GroupPowers.LandManageBanned;
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(agentID,
|
||||
land, requiredPowers))
|
||||
land, requiredPowers, false))
|
||||
{
|
||||
land.UpdateAccessList(flags, transactionID, sequenceID,
|
||||
sections, entries, remote_client);
|
||||
@@ -927,7 +927,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
//If we are still here, then they are subdividing within one piece of land
|
||||
//Check owner
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin))
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -996,7 +996,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin))
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1727,7 +1727,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
if (land == null) return;
|
||||
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions))
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions, false))
|
||||
return;
|
||||
|
||||
land.LandData.OtherCleanTime = otherCleanTime;
|
||||
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
if (targetAvatar.UserLevel == 0)
|
||||
{
|
||||
ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
|
||||
if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze))
|
||||
if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true))
|
||||
return;
|
||||
if (flags == 0)
|
||||
{
|
||||
@@ -1876,7 +1876,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
// Check if you even have permission to do this
|
||||
ILandObject land = m_scene.LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze) &&
|
||||
if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true) &&
|
||||
!m_scene.Permissions.IsAdministrator(client.AgentId))
|
||||
return;
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
// ParcelFlags.ForSaleObjects
|
||||
// ParcelFlags.LindenHome
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, false))
|
||||
{
|
||||
allowedDelta |= (uint)(ParcelFlags.AllowLandmark |
|
||||
ParcelFlags.AllowTerraform |
|
||||
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
ParcelFlags.AllowFly);
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale, true))
|
||||
{
|
||||
if (args.AuthBuyerID != newData.AuthBuyerID ||
|
||||
args.SalePrice != newData.SalePrice)
|
||||
@@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
allowedDelta |= (uint)ParcelFlags.ForSale;
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces, false))
|
||||
{
|
||||
newData.Category = args.Category;
|
||||
|
||||
@@ -333,21 +333,21 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
ParcelFlags.MaturePublish) | (uint)(1 << 23);
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity, false))
|
||||
{
|
||||
newData.Description = args.Desc;
|
||||
newData.Name = args.Name;
|
||||
newData.SnapshotID = args.SnapshotID;
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint, false))
|
||||
{
|
||||
newData.LandingType = args.LandingType;
|
||||
newData.UserLocation = args.UserLocation;
|
||||
newData.UserLookAt = args.UserLookAt;
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia, false))
|
||||
{
|
||||
newData.MediaAutoScale = args.MediaAutoScale;
|
||||
newData.MediaID = args.MediaID;
|
||||
@@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
ParcelFlags.UseEstateVoiceChan);
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses, false))
|
||||
{
|
||||
newData.PassHours = args.PassHours;
|
||||
newData.PassPrice = args.PassPrice;
|
||||
@@ -376,25 +376,27 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
allowedDelta |= (uint)ParcelFlags.UsePassList;
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed, false))
|
||||
{
|
||||
allowedDelta |= (uint)(ParcelFlags.UseAccessGroup |
|
||||
ParcelFlags.UseAccessList);
|
||||
}
|
||||
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned, false))
|
||||
{
|
||||
allowedDelta |= (uint)(ParcelFlags.UseBanList |
|
||||
ParcelFlags.DenyAnonymous |
|
||||
ParcelFlags.DenyAgeUnverified);
|
||||
}
|
||||
|
||||
uint preserve = LandData.Flags & ~allowedDelta;
|
||||
newData.Flags = preserve | (args.ParcelFlags & allowedDelta);
|
||||
if (allowedDelta != (uint)ParcelFlags.None)
|
||||
{
|
||||
uint preserve = LandData.Flags & ~allowedDelta;
|
||||
newData.Flags = preserve | (args.ParcelFlags & allowedDelta);
|
||||
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||
|
||||
SendLandUpdateToAvatarsOverMe(snap_selection);
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
|
||||
SendLandUpdateToAvatarsOverMe(snap_selection);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
|
||||
@@ -950,7 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client)
|
||||
{
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true))
|
||||
{
|
||||
List<uint> resultLocalIDs = new List<uint>();
|
||||
try
|
||||
@@ -1000,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
/// </param>
|
||||
public void SendLandObjectOwners(IClientAPI remote_client)
|
||||
{
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions))
|
||||
if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true))
|
||||
{
|
||||
Dictionary<UUID, int> primCount = new Dictionary<UUID, int>();
|
||||
List<UUID> groups = new List<UUID>();
|
||||
|
||||
@@ -42,8 +42,8 @@ using PermissionMask = OpenSim.Framework.PermissionMask;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PermissionsModule")]
|
||||
public class PermissionsModule : INonSharedRegionModule, IPermissionsModule
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DefaultPermissionsModule")]
|
||||
public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "PermissionsModule"; }
|
||||
get { return "DefaultPermissionsModule"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
@@ -1047,7 +1047,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
return GenericObjectPermission(editorID, objectID, false);
|
||||
}
|
||||
|
||||
private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene)
|
||||
private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager)
|
||||
{
|
||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||
|
||||
@@ -662,7 +662,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// Do the frame processing
|
||||
double steps = (double)m_currentFrame.TimeMS / tickDuration;
|
||||
|
||||
|
||||
if (steps <= 0.0)
|
||||
{
|
||||
m_group.RootPart.Velocity = Vector3.Zero;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene);
|
||||
public delegate bool IsAdministratorHandler(UUID user);
|
||||
public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||
public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene);
|
||||
public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager);
|
||||
public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||
public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||
public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||
@@ -763,7 +763,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
#region EDIT PARCEL
|
||||
|
||||
public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p)
|
||||
public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, bool allowManager)
|
||||
{
|
||||
EditParcelPropertiesHandler handler = OnEditParcelProperties;
|
||||
if (handler != null)
|
||||
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
Delegate[] list = handler.GetInvocationList();
|
||||
foreach (EditParcelPropertiesHandler h in list)
|
||||
{
|
||||
if (h(user, parcel, p, m_scene) == false)
|
||||
if (h(user, parcel, p, m_scene, allowManager) == false)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2802,8 +2802,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
|
||||
newObject.ResumeScripts();
|
||||
|
||||
if (newObject.RootPart.KeyframeMotion != null)
|
||||
newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject);
|
||||
// AddSceneObject already does this and doing it again messes
|
||||
// up region crossings, so don't.
|
||||
//if (newObject.RootPart.KeyframeMotion != null)
|
||||
// newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject);
|
||||
}
|
||||
|
||||
// Do this as late as possible so that listeners have full access to the incoming object
|
||||
|
||||
@@ -591,6 +591,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
avinfo.ParentID = av.ParentID;
|
||||
avsToCross.Add(avinfo);
|
||||
|
||||
av.PrevSitOffset = av.OffsetPosition;
|
||||
av.ParentID = 0;
|
||||
}
|
||||
|
||||
@@ -1072,6 +1073,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
SceneObjectPart part = parts[i];
|
||||
if (part.KeyframeMotion != null)
|
||||
{
|
||||
part.KeyframeMotion.UpdateSceneObject(this);
|
||||
}
|
||||
|
||||
if (Object.ReferenceEquals(part, m_rootPart))
|
||||
continue;
|
||||
|
||||
@@ -1880,25 +1886,27 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
SceneObjectPart part = parts[i];
|
||||
|
||||
Scene.ForEachRootScenePresence(delegate(ScenePresence avatar)
|
||||
if (Scene != null)
|
||||
{
|
||||
if (avatar.ParentID == LocalId)
|
||||
avatar.StandUp();
|
||||
|
||||
if (!silent)
|
||||
Scene.ForEachRootScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
part.ClearUpdateSchedule();
|
||||
if (part == m_rootPart)
|
||||
{
|
||||
if (!IsAttachment
|
||||
|| AttachedAvatar == avatar.ControllingClient.AgentId
|
||||
|| !HasPrivateAttachmentPoint)
|
||||
avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (avatar.ParentID == LocalId)
|
||||
avatar.StandUp();
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
part.ClearUpdateSchedule();
|
||||
if (part == m_rootPart)
|
||||
{
|
||||
if (!IsAttachment
|
||||
|| AttachedAvatar == avatar.ControllingClient.AgentId
|
||||
|| !HasPrivateAttachmentPoint)
|
||||
avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddScriptLPS(int count)
|
||||
@@ -3483,8 +3491,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
part.ClonePermissions(RootPart);
|
||||
});
|
||||
|
||||
uint lockMask = ~(uint)PermissionMask.Move;
|
||||
uint lockBit = RootPart.OwnerMask & (uint)PermissionMask.Move;
|
||||
uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify);
|
||||
uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move | PermissionMask.Modify);
|
||||
RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask);
|
||||
RootPart.ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
private int m_movementAnimationUpdateCounter = 0;
|
||||
|
||||
private Vector3 m_prevSitOffset;
|
||||
public Vector3 PrevSitOffset { get; set; }
|
||||
|
||||
protected AvatarAppearance m_appearance;
|
||||
|
||||
@@ -957,7 +957,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// ParentPosition = part.GetWorldPosition();
|
||||
ParentID = part.LocalId;
|
||||
ParentPart = part;
|
||||
m_pos = m_prevSitOffset;
|
||||
m_pos = PrevSitOffset;
|
||||
// pos = ParentPosition;
|
||||
pos = part.GetWorldPosition();
|
||||
}
|
||||
@@ -2261,6 +2261,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if (ParentID != 0)
|
||||
{
|
||||
PrevSitOffset = m_pos; // Save sit offset
|
||||
SceneObjectPart part = ParentPart;
|
||||
UnRegisterSeatControls(part.ParentGroup.UUID);
|
||||
|
||||
@@ -3487,7 +3488,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
cAgent.Appearance = new AvatarAppearance(Appearance);
|
||||
|
||||
cAgent.ParentPart = ParentUUID;
|
||||
cAgent.SitOffset = m_pos;
|
||||
cAgent.SitOffset = PrevSitOffset;
|
||||
|
||||
lock (scriptedcontrols)
|
||||
{
|
||||
@@ -3530,7 +3531,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
CameraLeftAxis = cAgent.LeftAxis;
|
||||
CameraUpAxis = cAgent.UpAxis;
|
||||
ParentUUID = cAgent.ParentPart;
|
||||
m_prevSitOffset = cAgent.SitOffset;
|
||||
PrevSitOffset = cAgent.SitOffset;
|
||||
|
||||
// When we get to the point of re-computing neighbors everytime this
|
||||
// changes, then start using the agent's drawdistance rather than the
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
IConfigSource configSource = new IniConfigSource();
|
||||
IConfig config = configSource.AddConfig("Startup");
|
||||
config.Set("serverside_object_permissions", true);
|
||||
SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() });
|
||||
SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
|
||||
IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
|
||||
|
||||
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
|
||||
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
IConfigSource configSource = new IniConfigSource();
|
||||
IConfig config = configSource.AddConfig("Startup");
|
||||
config.Set("serverside_object_permissions", true);
|
||||
SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() });
|
||||
SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
|
||||
IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
|
||||
|
||||
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
|
||||
@@ -195,4 +195,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
// Assert.That(retrievedPart, Is.Null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
|
||||
SceneHelpers.SetupSceneModules(
|
||||
scene, configSource, new object[]
|
||||
{ new PermissionsModule(),
|
||||
{ new DefaultPermissionsModule(),
|
||||
new GroupsModule(),
|
||||
new MockGroupsServicesConnector() });
|
||||
|
||||
@@ -82,4 +82,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
// We need to set up the permisions module on scene B so that our later use of agent limit to deny
|
||||
// QueryAccess won't succeed anyway because administrators are always allowed in and the default
|
||||
// IsAdministrator if no permissions module is present is true.
|
||||
SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB });
|
||||
SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB });
|
||||
|
||||
// Shared scene modules
|
||||
SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
|
||||
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
// We need to set up the permisions module on scene B so that our later use of agent limit to deny
|
||||
// QueryAccess won't succeed anyway because administrators are always allowed in and the default
|
||||
// IsAdministrator if no permissions module is present is true.
|
||||
SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB });
|
||||
SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB });
|
||||
|
||||
// Shared scene modules
|
||||
SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
|
||||
@@ -507,4 +507,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
// TestHelpers.DisableLogging();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -635,15 +635,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||
// TODO: EstateSettings don't seem to get propagated...
|
||||
if (!scene.RegionInfo.EstateSettings.AllowVoice)
|
||||
{
|
||||
m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings",
|
||||
scene.RegionInfo.RegionName);
|
||||
//m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings",
|
||||
// scene.RegionInfo.RegionName);
|
||||
channel_uri = String.Empty;
|
||||
}
|
||||
|
||||
if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0)
|
||||
{
|
||||
m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel",
|
||||
scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName);
|
||||
//m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel",
|
||||
// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName);
|
||||
channel_uri = String.Empty;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -203,8 +203,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||
{
|
||||
}
|
||||
|
||||
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn)
|
||||
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn, out string result)
|
||||
{
|
||||
result = String.Empty;
|
||||
string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
|
||||
|
||||
bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
|
||||
|
||||
@@ -105,9 +105,9 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||
return m_rootScene.Permissions.CanEditObject(objectid, editorid);
|
||||
}
|
||||
|
||||
public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers g, Scene scene)
|
||||
public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers g, Scene scene, bool allowManager)
|
||||
{
|
||||
return m_rootScene.Permissions.CanEditParcelProperties(user, parcel, g);
|
||||
return m_rootScene.Permissions.CanEditParcelProperties(user, parcel, g, allowManager);
|
||||
}
|
||||
|
||||
public bool CanInstantMessage(UUID user, UUID target, Scene startscene)
|
||||
|
||||
@@ -3109,8 +3109,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
string reason;
|
||||
money.ObjectGiveMoney(
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero, out reason);
|
||||
});
|
||||
|
||||
return 0;
|
||||
@@ -7105,7 +7106,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
UUID key;
|
||||
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
|
||||
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned))
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false))
|
||||
{
|
||||
int expires = 0;
|
||||
if (hours != 0)
|
||||
@@ -10430,7 +10431,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);
|
||||
if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia)) return;
|
||||
if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia, false)) return;
|
||||
|
||||
bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
|
||||
byte loop = 0;
|
||||
@@ -10873,7 +10874,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
UUID key;
|
||||
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned))
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false))
|
||||
{
|
||||
int expires = 0;
|
||||
if (hours != 0)
|
||||
@@ -10914,7 +10915,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
UUID key;
|
||||
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed))
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed, false))
|
||||
{
|
||||
if (UUID.TryParse(avatar, out key))
|
||||
{
|
||||
@@ -10941,7 +10942,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
UUID key;
|
||||
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned))
|
||||
if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false))
|
||||
{
|
||||
if (UUID.TryParse(avatar, out key))
|
||||
{
|
||||
@@ -12784,8 +12785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
string reason;
|
||||
bool result = money.ObjectGiveMoney(
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn);
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason);
|
||||
|
||||
if (result)
|
||||
{
|
||||
@@ -12793,7 +12795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
replydata = "LINDENDOLLAR_INSUFFICIENTFUNDS";
|
||||
replydata = reason;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -1434,7 +1434,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions))
|
||||
if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions, false))
|
||||
{
|
||||
OSSLShoutError("You do not have permission to modify the parcel");
|
||||
return;
|
||||
|
||||
@@ -231,6 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
ItemID = ScriptTask.ItemID;
|
||||
AssetID = ScriptTask.AssetID;
|
||||
}
|
||||
LocalID = part.LocalId;
|
||||
|
||||
PrimName = part.ParentGroup.Name;
|
||||
StartParam = startParam;
|
||||
|
||||
@@ -1316,13 +1316,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
|
||||
ScriptInstance instance = null;
|
||||
// Create the object record
|
||||
UUID appDomain = assetID;
|
||||
|
||||
|
||||
|
||||
lockScriptsForRead(true);
|
||||
if ((!m_Scripts.ContainsKey(itemID)) ||
|
||||
(m_Scripts[itemID].AssetID != assetID))
|
||||
{
|
||||
lockScriptsForRead(false);
|
||||
|
||||
UUID appDomain = assetID;
|
||||
instance = new ScriptInstance(this, part,
|
||||
item,
|
||||
startParam, postOnRez,
|
||||
m_MaxScriptQueue);
|
||||
|
||||
|
||||
|
||||
if (part.ParentGroup.IsAttachment)
|
||||
appDomain = part.ParentGroup.RootPart.UUID;
|
||||
@@ -1345,9 +1353,39 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
sandbox = AppDomain.CreateDomain(
|
||||
m_Scene.RegionInfo.RegionID.ToString(),
|
||||
evidence, appSetup);
|
||||
m_AppDomains[appDomain].AssemblyResolve +=
|
||||
new ResolveEventHandler(
|
||||
AssemblyResolver.OnAssemblyResolve);
|
||||
if (m_AppDomains.ContainsKey(appDomain))
|
||||
{
|
||||
m_AppDomains[appDomain].AssemblyResolve +=
|
||||
new ResolveEventHandler(
|
||||
AssemblyResolver.OnAssemblyResolve);
|
||||
if (m_DomainScripts.ContainsKey(appDomain))
|
||||
{
|
||||
m_DomainScripts[appDomain].Add(itemID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DomainScripts.Add(appDomain, new List<UUID>());
|
||||
m_DomainScripts[appDomain].Add(itemID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_AppDomains.Add(appDomain, sandbox);
|
||||
m_AppDomains[appDomain].AssemblyResolve +=
|
||||
new ResolveEventHandler(
|
||||
AssemblyResolver.OnAssemblyResolve);
|
||||
if (m_DomainScripts.ContainsKey(appDomain))
|
||||
{
|
||||
m_DomainScripts[appDomain].Add(itemID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DomainScripts.Add(appDomain, new List<UUID>());
|
||||
m_DomainScripts[appDomain].Add(itemID);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1373,12 +1411,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
return false;
|
||||
}
|
||||
}
|
||||
m_DomainScripts[appDomain].Add(itemID);
|
||||
|
||||
instance = new ScriptInstance(this, part,
|
||||
item,
|
||||
startParam, postOnRez,
|
||||
m_MaxScriptQueue);
|
||||
|
||||
|
||||
instance.Load(m_AppDomains[appDomain], assembly, stateSource);
|
||||
// m_log.DebugFormat(
|
||||
@@ -1502,6 +1535,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
if (handlerObjectRemoved != null)
|
||||
{
|
||||
SceneObjectPart part = m_Scene.GetSceneObjectPart(localID);
|
||||
if (part != null)
|
||||
handlerObjectRemoved(part.UUID);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user