aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-14 18:08:22 +0000
committerMelanie Thielker2008-08-14 18:08:22 +0000
commitc2f1771c63108c78b799a4f107cabe7e33984866 (patch)
tree40b76fc02e6ec938d841f3d51f11417131cfb850 /OpenSim/Region/Environment
parentMantis #1953 (diff)
downloadopensim-SC_OLD-c2f1771c63108c78b799a4f107cabe7e33984866.zip
opensim-SC_OLD-c2f1771c63108c78b799a4f107cabe7e33984866.tar.gz
opensim-SC_OLD-c2f1771c63108c78b799a4f107cabe7e33984866.tar.bz2
opensim-SC_OLD-c2f1771c63108c78b799a4f107cabe7e33984866.tar.xz
Make the estate owner work. Changes permissions checks to allow the
estate owner user the ability to add and remove estate managers, and have EM rights outside of that.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs6
3 files changed, 14 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index 1be587a..d22aac6 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
218 switch (estateAccessType) 218 switch (estateAccessType)
219 { 219 {
220 case 64: 220 case 64:
221 if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) 221 if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, false) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
222 { 222 {
223 EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; 223 EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
224 224
@@ -267,7 +267,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
267 } 267 }
268 break; 268 break;
269 case 128: 269 case 128:
270 if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) 270 if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, false) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
271 { 271 {
272 EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; 272 EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
273 273
@@ -303,9 +303,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
303 break; 303 break;
304 case 256: 304 case 256:
305 305
306 // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml 306 if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, true) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
307 // So make sure you really trust your region owners. because they can add other estate manaagers to your other estates
308 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
309 { 307 {
310 m_scene.RegionInfo.EstateSettings.AddEstateManager(user); 308 m_scene.RegionInfo.EstateSettings.AddEstateManager(user);
311 m_scene.RegionInfo.EstateSettings.Save(); 309 m_scene.RegionInfo.EstateSettings.Save();
@@ -318,9 +316,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
318 316
319 break; 317 break;
320 case 512: 318 case 512:
321 // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml 319 if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId, true) || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
322 // So make sure you really trust your region owners. because they can add other estate manaagers to your other estates
323 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.ExternalChecks.ExternalChecksBypassPermissions())
324 { 320 {
325 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); 321 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
326 m_scene.RegionInfo.EstateSettings.Save(); 322 m_scene.RegionInfo.EstateSettings.Save();
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index 0dfcb44..25ea282 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -626,11 +626,17 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
626 return GenericCommunicationPermission(user, target); 626 return GenericCommunicationPermission(user, target);
627 } 627 }
628 628
629 private bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene) 629 private bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand)
630 { 630 {
631 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 631 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
632 if (m_bypassPermissions) return m_bypassPermissionsValue; 632 if (m_bypassPermissions) return m_bypassPermissionsValue;
633 633
634 if (m_scene.RegionInfo.EstateSettings.IsEstateOwner(user))
635 return true;
636
637 if (ownerCommand)
638 return false;
639
634 return GenericEstatePermission(user); 640 return GenericEstatePermission(user);
635 } 641 }
636 642
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
index c7d1ce2..0b2cc9e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
@@ -761,7 +761,7 @@ namespace OpenSim.Region.Environment.Scenes
761 #endregion 761 #endregion
762 762
763 #region CAN ISSUE ESTATE COMMAND 763 #region CAN ISSUE ESTATE COMMAND
764 public delegate bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene); 764 public delegate bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand);
765 private List<CanIssueEstateCommand> CanIssueEstateCommandCheckFunctions = new List<CanIssueEstateCommand>(); 765 private List<CanIssueEstateCommand> CanIssueEstateCommandCheckFunctions = new List<CanIssueEstateCommand>();
766 766
767 public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) 767 public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc)
@@ -775,11 +775,11 @@ namespace OpenSim.Region.Environment.Scenes
775 CanIssueEstateCommandCheckFunctions.Remove(delegateFunc); 775 CanIssueEstateCommandCheckFunctions.Remove(delegateFunc);
776 } 776 }
777 777
778 public bool ExternalChecksCanIssueEstateCommand(LLUUID user) 778 public bool ExternalChecksCanIssueEstateCommand(LLUUID user, bool ownerCommand)
779 { 779 {
780 foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions) 780 foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions)
781 { 781 {
782 if (check(user, m_scene) == false) 782 if (check(user, m_scene, ownerCommand) == false)
783 { 783 {
784 return false; 784 return false;
785 } 785 }