diff options
author | Melanie Thielker | 2008-08-15 13:13:39 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-15 13:13:39 +0000 |
commit | dfc553d0a4c25d6c1f491b228e89402c0415acda (patch) | |
tree | 63653f47cc17365ec828f2e5507b7fd75c0388be /OpenSim/Region/Environment/Modules/World | |
parent | Minor formatting cleanup. (diff) | |
download | opensim-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')
4 files changed, 29 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 2b1a4ed..e6597c3 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -137,6 +137,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
137 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid | 137 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid |
138 | // otherwise, use the master avatar uuid instead | 138 | // otherwise, use the master avatar uuid instead |
139 | LLUUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 139 | LLUUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
140 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) | ||
141 | masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
140 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 142 | foreach (SceneObjectPart part in sceneObject.Children.Values) |
141 | { | 143 | { |
142 | if (!resolveUserUuid(part.CreatorID)) | 144 | if (!resolveUserUuid(part.CreatorID)) |
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index d22aac6..1e622be 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -212,6 +212,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
212 | { | 212 | { |
213 | // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. | 213 | // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. |
214 | 214 | ||
215 | if (user == m_scene.RegionInfo.EstateSettings.EstateOwner) | ||
216 | return; // never process EO | ||
215 | if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID) | 217 | if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID) |
216 | return; // never process owner | 218 | return; // never process owner |
217 | 219 | ||
@@ -557,7 +559,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
557 | 559 | ||
558 | args.regionFlags = GetRegionFlags(); | 560 | args.regionFlags = GetRegionFlags(); |
559 | args.regionName = m_scene.RegionInfo.RegionName; | 561 | args.regionName = m_scene.RegionInfo.RegionName; |
560 | args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 562 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) |
563 | args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
564 | else | ||
565 | args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
561 | args.terrainBase0 = LLUUID.Zero; | 566 | args.terrainBase0 = LLUUID.Zero; |
562 | args.terrainBase1 = LLUUID.Zero; | 567 | args.terrainBase1 = LLUUID.Zero; |
563 | args.terrainBase2 = LLUUID.Zero; | 568 | args.terrainBase2 = LLUUID.Zero; |
@@ -811,6 +816,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
811 | { | 816 | { |
812 | if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID) | 817 | if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID) |
813 | return true; | 818 | return true; |
819 | if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner) | ||
820 | return true; | ||
814 | 821 | ||
815 | List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers); | 822 | List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers); |
816 | if (ems.Contains(avatarID)) | 823 | if (ems.Contains(avatarID)) |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index ca03035..d5cb0eb 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs | |||
@@ -162,7 +162,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
162 | ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene); | 162 | ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene); |
163 | 163 | ||
164 | fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); | 164 | fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); |
165 | fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 165 | if(m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) |
166 | fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
167 | else | ||
168 | fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
166 | fullSimParcel.landData.ClaimDate = Util.UnixTimeSinceEpoch(); | 169 | fullSimParcel.landData.ClaimDate = Util.UnixTimeSinceEpoch(); |
167 | AddLandObject(fullSimParcel); | 170 | AddLandObject(fullSimParcel); |
168 | } | 171 | } |
@@ -931,7 +934,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
931 | { | 934 | { |
932 | if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) | 935 | if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) |
933 | { | 936 | { |
934 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 937 | if(m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) |
938 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
939 | else | ||
940 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
935 | m_scene.Broadcast(SendParcelOverlay); | 941 | m_scene.Broadcast(SendParcelOverlay); |
936 | landList[local_id].sendLandUpdateToClient(remote_client); | 942 | landList[local_id].sendLandUpdateToClient(remote_client); |
937 | } | 943 | } |
@@ -945,7 +951,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
945 | { | 951 | { |
946 | if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) | 952 | if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) |
947 | { | 953 | { |
948 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 954 | if(m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) |
955 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
956 | else | ||
957 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
949 | landList[local_id].landData.ClaimDate = Util.UnixTimeSinceEpoch(); | 958 | landList[local_id].landData.ClaimDate = Util.UnixTimeSinceEpoch(); |
950 | m_scene.Broadcast(SendParcelOverlay); | 959 | m_scene.Broadcast(SendParcelOverlay); |
951 | landList[local_id].sendLandUpdateToClient(remote_client); | 960 | landList[local_id].sendLandUpdateToClient(remote_client); |
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; | |||
32 | using System.Collections.Generic; | 32 | using System.Collections.Generic; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using log4net; | 34 | using log4net; |
35 | using OpenSim.Framework; | ||
35 | using OpenSim.Region.Environment.Interfaces; | 36 | using OpenSim.Region.Environment.Interfaces; |
36 | using OpenSim.Region.Environment.Modules.Framework; | 37 | using OpenSim.Region.Environment.Modules.Framework; |
37 | using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander; | 38 | using 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 | ||