Restructure god level and permissions

Create a class GodController which controls all aspects of god level,
viewer modes and user levels at ScenePresence level.
This commit is contained in:
Melanie Thielker
2017-01-06 00:55:14 +00:00
parent 46bffad558
commit ad8915f154
22 changed files with 105 additions and 150 deletions

View File

@@ -2077,7 +2077,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agentpos.Position = sp.AbsolutePosition;
agentpos.Velocity = sp.Velocity;
agentpos.RegionHandle = currentRegionHandler;
agentpos.GodLevel = sp.GodLevel;
//agentpos.GodLevel = sp.GodLevel;
agentpos.GodData = sp.GodController.State();
agentpos.Throttles = spClient.GetThrottlesPacked(1);
// agentpos.ChildrenCapSeeds = seeds;

View File

@@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
// this user is going to another grid
// for local users, check if HyperGrid teleport is allowed, based on user level
if (Scene.UserManagementModule.IsLocalGridUser(sp.UUID) && sp.UserLevel < m_levelHGTeleport)
if (Scene.UserManagementModule.IsLocalGridUser(sp.UUID) && sp.GodController.UserLevel < m_levelHGTeleport)
{
m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: Unable to HG teleport agent due to insufficient UserLevel.");
reason = "Hypergrid teleport not allowed";