mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
This commit is contained in:
@@ -40,6 +40,9 @@ using OpenSim.Framework.Serialization;
|
||||
using OpenSim.Region.CoreModules.World.Terrain;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using Ionic.Zlib;
|
||||
using GZipStream = Ionic.Zlib.GZipStream;
|
||||
using CompressionMode = Ionic.Zlib.CompressionMode;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
{
|
||||
@@ -82,7 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
{
|
||||
try
|
||||
{
|
||||
m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress);
|
||||
m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress, CompressionLevel.BestCompression);
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
|
||||
@@ -166,6 +166,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
m_scene.Permissions.OnDeedParcel += CanDeedParcel;
|
||||
m_scene.Permissions.OnDeedObject += CanDeedObject;
|
||||
m_scene.Permissions.OnIsGod += IsGod;
|
||||
m_scene.Permissions.OnIsGridGod += IsGridGod;
|
||||
m_scene.Permissions.OnIsAdministrator += IsAdministrator;
|
||||
m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
||||
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||
@@ -466,22 +467,34 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
if (IsEstateManager(user) && m_RegionManagerIsGod)
|
||||
return true;
|
||||
|
||||
if (IsGridGod(user, null))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the given user a God throughout the grid (not just in the current scene)?
|
||||
/// </summary>
|
||||
/// <param name="user">The user</param>
|
||||
/// <param name="scene">Unused, can be null</param>
|
||||
/// <returns></returns>
|
||||
protected bool IsGridGod(UUID user, Scene scene)
|
||||
{
|
||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||
|
||||
if (user == UUID.Zero) return false;
|
||||
|
||||
if (m_allowGridGods)
|
||||
{
|
||||
ScenePresence sp = m_scene.GetScenePresence(user);
|
||||
if (sp != null)
|
||||
{
|
||||
if (sp.UserLevel >= 200)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
return (sp.UserLevel >= 200);
|
||||
|
||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user);
|
||||
if (account != null)
|
||||
{
|
||||
if (account.UserLevel >= 200)
|
||||
return true;
|
||||
}
|
||||
return (account.UserLevel >= 200);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user