Compare commits

...

5 Commits

Author SHA1 Message Date
Melanie Thielker 5f4dc6fe61 Add the return object permissions fix 2009-05-24 18:26:25 +00:00
lbsa71 c4e4cd5931 * Re-applied r9613 to "Fix a slight oversight in SceneInventory that would not enable copy to
inventory when permissions are bypassed"
2009-05-20 13:07:52 +00:00
lbsa71 89e7dac649 * Ignored some gens 2009-05-20 09:11:20 +00:00
lbsa71 d217f1e9e7 * Updated version numbers to 0.6.5 2009-05-20 06:41:36 +00:00
lbsa71 319ad737bc Copied r9561 as base for the 0.6.5-rc1 2009-05-20 06:07:04 +00:00
37 changed files with 158 additions and 71 deletions

View File

@ -60,7 +60,7 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -30,6 +30,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
// Revision
//
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyVersion("0.6.5.*")]

View File

@ -32,7 +32,7 @@ namespace OpenSim
/// <value>
/// This is the OpenSim version string. Change this if you are releasing a new OpenSim version.
/// </value>
public readonly static string Version = "OpenSimulator Server 0.6.4"; // stay with 27 chars (used in regioninfo)
public readonly static string Version = "OpenSimulator Server 0.6.5"; // stay with 27 chars (used in regioninfo)
/// <value>
/// This is the external interface version. It is separate from the OpenSimulator project version.

View File

@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
// Revision
//
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
// Revision
//
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
// Revision
//
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -856,7 +856,10 @@ namespace OpenSim.Region.CoreModules.World.Land
}
foreach (List<SceneObjectGroup> ol in returns.Values)
m_scene.returnObjects(ol.ToArray(), remote_client.AgentId);
{
if (m_scene.Permissions.CanUseObjectReturn(this, type, remote_client, ol))
m_scene.returnObjects(ol.ToArray(), remote_client.AgentId);
}
}
#endregion

View File

@ -168,6 +168,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED
m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED
m_scene.Permissions.OnUseObjectReturn += CanUseObjectReturn; //NOT YET IMPLEMENTED
m_scene.AddCommand(this, "bypass permissions",
"bypass permissions <true / false>",
@ -1523,5 +1524,65 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// You can reset the scripts in any object you can edit
return GenericObjectPermission(agentID, prim, false);
}
private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
long powers = 0;
if (parcel.landData.GroupID != UUID.Zero)
client.GetGroupPowers(parcel.landData.GroupID);
switch (type)
{
case (uint)ObjectReturnType.Owner:
// Don't let group members return owner's objects, ever
//
if (parcel.landData.IsGroupOwned)
{
if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0)
return true;
}
else
{
if (parcel.landData.OwnerID != client.AgentId)
return false;
}
break;
case (uint)ObjectReturnType.Group:
if (parcel.landData.OwnerID != client.AgentId)
{
// If permissionis granted through a group...
//
if ((powers & (long)GroupPowers.ReturnGroupSet) != 0)
{
foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist))
{
// check for and remove group owned objects unless
// the user also has permissions to return those
//
if (g.OwnerID == g.GroupID &&
((powers & (long)GroupPowers.ReturnGroupOwned) == 0))
{
retlist.Remove(g);
}
}
// And allow the operation
//
return true;
}
}
break;
case (uint)ObjectReturnType.Other:
if ((powers & (long)GroupPowers.ReturnNonGroup) != 0)
return true;
break;
case (uint)ObjectReturnType.List:
break;
}
return GenericParcelPermission(client.AgentId, parcel);
}
}
}

View File

@ -57,6 +57,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -2262,6 +2262,12 @@ namespace OpenSim.Region.Framework.Scenes
itemId = item.ID;
}
}
else
{
// Brave new fullperm world
//
itemId = item.ID;
}
string xmlData = Utils.BytesToString(rezAsset.Data);
SceneObjectGroup group

View File

@ -79,6 +79,7 @@ namespace OpenSim.Region.Framework.Scenes
public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID);
public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID);
public delegate bool TeleportHandler(UUID userID, Scene scene);
public delegate bool UseObjectReturnHandler(ILandObject landData, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene);
#endregion
public class ScenePermissions
@ -135,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes
public event CopyUserInventoryHandler OnCopyUserInventory;
public event DeleteUserInventoryHandler OnDeleteUserInventory;
public event TeleportHandler OnTeleport;
public event UseObjectReturnHandler OnUseObjectReturn;
#endregion
#region Object Permission Checks
@ -910,5 +912,20 @@ namespace OpenSim.Region.Framework.Scenes
}
return true;
}
public bool CanUseObjectReturn(ILandObject landData, uint type , IClientAPI client, List<SceneObjectGroup> retlist)
{
UseObjectReturnHandler handler = OnUseObjectReturn;
if (handler != null)
{
Delegate[] list = handler.GetInvocationList();
foreach (UseObjectReturnHandler h in list)
{
if (h(landData, type, client, retlist, m_scene) == false)
return false;
}
}
return true;
}
}
}

View File

@ -57,6 +57,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyVersion("0.6.5.*")]

View File

@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyVersion("0.6.5.*")]

View File

@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyVersion("0.6.5.*")]

View File

@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyVersion("0.6.5.*")]

View File

@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyVersion("0.6.5.*")]

View File

@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyVersion("0.6.5.*")]

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.6.4.*")]
[assembly : AssemblyFileVersion("1.0.0.0")]
[assembly : AssemblyVersion("0.6.5.*")]
[assembly : AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]

View File

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyVersion("0.6.4.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.0")]