aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Permissions
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-15 13:13:39 +0000
committerMelanie Thielker2008-08-15 13:13:39 +0000
commitdfc553d0a4c25d6c1f491b228e89402c0415acda (patch)
tree63653f47cc17365ec828f2e5507b7fd75c0388be /OpenSim/Region/Environment/Modules/World/Permissions
parentMinor formatting cleanup. (diff)
downloadopensim-SC-dfc553d0a4c25d6c1f491b228e89402c0415acda.zip
opensim-SC-dfc553d0a4c25d6c1f491b228e89402c0415acda.tar.gz
opensim-SC-dfc553d0a4c25d6c1f491b228e89402c0415acda.tar.bz2
opensim-SC-dfc553d0a4c25d6c1f491b228e89402c0415acda.tar.xz
Fix up master avatar handling for estate owners. Introduces a new
hierarchical rights structure. MasterAvatar: Owner of the region server (may be null), net gods (users with GodLevel 200), Estate owner (from database). Look at Opensim.ini.example to enable net gods. Estate owner will default to master avatar.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Permissions')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index 0fbd4fb..6f72767 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -32,6 +32,7 @@ using System.Collections;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Reflection; 33using System.Reflection;
34using log4net; 34using log4net;
35using OpenSim.Framework;
35using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
36using OpenSim.Region.Environment.Modules.Framework; 37using OpenSim.Region.Environment.Modules.Framework;
37using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander; 38using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander;
@@ -63,6 +64,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
63 private bool m_bypassPermissions = false; 64 private bool m_bypassPermissions = false;
64 private bool m_bypassPermissionsValue = true; 65 private bool m_bypassPermissionsValue = true;
65 private bool m_debugPermissions = false; 66 private bool m_debugPermissions = false;
67 private bool m_allowGridGods = false;
66 68
67 #endregion 69 #endregion
68 70
@@ -136,6 +138,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
136 if (!modules.Contains("DefaultPermissionsModule")) 138 if (!modules.Contains("DefaultPermissionsModule"))
137 return; 139 return;
138 140
141 m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false);
142
139 m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); 143 m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
140 144
141 if (m_bypassPermissions) 145 if (m_bypassPermissions)
@@ -231,11 +235,6 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
231 235
232 protected bool IsAdministrator(LLUUID user) 236 protected bool IsAdministrator(LLUUID user)
233 { 237 {
234// m_log.DebugFormat(
235// "[PERMISSIONS]: Is adminstrator called for {0} where region master avatar is {1}",
236// user, m_scene.RegionInfo.MasterAvatarAssignedUUID);
237
238 // If there is no master avatar, return false
239 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) 238 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero)
240 { 239 {
241 if (m_scene.RegionInfo.MasterAvatarAssignedUUID == user) 240 if (m_scene.RegionInfo.MasterAvatarAssignedUUID == user)
@@ -246,7 +245,9 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
246 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user) 245 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user)
247 return true; 246 return true;
248 } 247 }
249 248 UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(user);
249 if((userProfile.GodLevel) >= 200 && m_allowGridGods)
250 return true;
250 return false; 251 return false;
251 } 252 }
252 253